Jump to content

link checker, and speed tester


jjmusicpro

Recommended Posts

just curious, i have a list of urls, around 200 ie:

 

someplace.com/index.html

overthere.checkmeout.com

joesplace.overhere.com

 

I wanted to be able to run a query on these urls, and check if the pages is loading/working, if not kick back the error code, IE 404 eorre etc.

also a way to check the load time..

 

is his possible with php?

Link to comment
https://forums.phpfreaks.com/topic/72003-link-checker-and-speed-tester/
Share on other sites

something like this is what im looking for: http://www.selfseo.com/website_speed_test.php

 

i wont need many error codes, maybe like 5 of the top ones...

 

i am more curious about a page either not being there, or not loading.

 

really to, the speed in which it opens is vital to me.

 

any ideas?

tracking time is simple, set $start_time = microtime(); before you do something, do something, then compare the new microtime() with $start_time;

 

you can get a page simply enough with fopen:

 

$fd = fopen ($url, "rb");
while (!feof ($fd))
    $buffer .= fgets($fd, 4096);
fclose ($fd);

 

but if you need http headers to get result codes, you'll probably need to look into the curl functions. but first make sure curl is installed and enabled via phpinfo();

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.