Portal Home > Knowledgebase > Articles Database > PHP - how to get remote server load time?
PHP - how to get remote server load time?
Posted by imanewbie, 04-27-2011, 07:35 AM |
If I want to know my server's time load then I use this What if I want to display other sites load time on my site?
i.e: google load time = 0.55ms
yahoo load time = 0.1 ms
Please help
|
Posted by DewlanceHosting, 04-27-2011, 08:03 AM |
Hello,
Place this php file on your remote server and use iFrame on your 2nd server.
or
or
|
Posted by DewlanceHosting, 04-27-2011, 08:09 AM |
Sorry, I just found a good script for checking remote server load time.
Don't forget to replace site name and maybe port(I think 80 is default and you don't need to change port)
and I think script is using fopen so you need to enable fopen in your .php.ini.
|
Posted by imanewbie, 04-27-2011, 08:35 AM |
OK, this test the connection if fail or not within 30 seconds.
If the connection is good, how to know load time of www.example.com in ms?
|
Posted by DewlanceHosting, 04-27-2011, 08:48 AM |
Yes, Replace this line with your code(I post 2 - 3 code on my 1st reply and only you need to add any one code)
|
Posted by imanewbie, 04-27-2011, 08:52 AM |
hmm, but the code you posted needed to put it on remote server?
what If I want to check google.com load time.
What i mean is same as http://www.iwebtool.com/speed_test?domain=google.com
|
Posted by DewlanceHosting, 04-27-2011, 09:24 AM |
Its a site speed tester, you can find a lots of site speed tester script.
You want to check site speed test or server load?
No, you don't need to put this code on your remote server.
|
Posted by imanewbie, 04-27-2011, 12:04 PM |
I want to check site speed test but after I google I can find only the code for my own site, but I want the code to check others sites.
|
Posted by jaequery, 05-03-2011, 09:36 PM |
from your linux console or through php's exec(), do:
time wget -p http://www.google.com >/dev/null 2>&1
it'll give you the results in milliseconds
|
Add to Favourites Print this Article
Also Read
js scripts (Views: 1516)