i meant time from i send the requestpacket to the server begins processing the request, but i think that i have found a sollution now. I've used microtime() to time how long it took to make a fsockopen() on the webpage... schouldnt the output then be showing the result of my problem??

Warren Vail wrote:
I support several PHPNuke sites and the page preparation time is measured by
taking a microtime stamp at the very beginning of the script and another
just before echoing the last couple of lines at the bottom of the page and
producing something like the following on the bottom of the page;

Page Generation: 0.376 Seconds

This does not measure all the elements of delay, however, which can be
broken down into the following;

1. Time it takes for browser to get the request packet to the web server.
2. Time it take the web server to begin processing the request.
3. Time it takes to load PHP and for PHP to load your script (CGI or MOD?)

4. Time it takes for your script to complete execution is measured above.

5. Time it takes for the cached output from your script to be delivered back
to the browser.
6. Time it takes to perform 1-5 above for any imbedded images, etc requests.
7. Time it takes for the browser to render the completed page.

It's not clear from your question, which of these you wanted to measure.  If
you were to develop another application running on your local machine, then
you could use things like socket connections to simulate a browser, invoke
the page and measure the total span of time.  In this case I would recommend
using CURL, or Pears HTTP_REQUEST instead of dealing with the intricacies of
building the request, etc.

Hope this helps,

Warren Vail


-----Original Message-----
From: Tobias Grønlund [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 4:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: webserver response-time, how?



M. Sokolewicz wrote:


Tobias grønlund wrote:


Im trying to find a way of getting the responsetime from a remote
webserver before it actually starts sending some output for your browser to read. Any ideas??

try timing the fsockopen() or (whatever you use) call. :) That'll give you a reasonable estimate.

- Tul


how do i do that??


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to