Jump to content

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();

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.