jjmusicpro Posted October 5, 2007 Share Posted October 5, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/72003-link-checker-and-speed-tester/ Share on other sites More sharing options...
BlueSkyIS Posted October 5, 2007 Share Posted October 5, 2007 yes. i'd use curl, but there are simpler ways depending on how much http status code and other info you need. Quote Link to comment https://forums.phpfreaks.com/topic/72003-link-checker-and-speed-tester/#findComment-362727 Share on other sites More sharing options...
jjmusicpro Posted October 5, 2007 Author Share Posted October 5, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/72003-link-checker-and-speed-tester/#findComment-362729 Share on other sites More sharing options...
BlueSkyIS Posted October 5, 2007 Share Posted October 5, 2007 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(); Quote Link to comment https://forums.phpfreaks.com/topic/72003-link-checker-and-speed-tester/#findComment-362732 Share on other sites More sharing options...
jjmusicpro Posted October 5, 2007 Author Share Posted October 5, 2007 see PM blue sky Quote Link to comment https://forums.phpfreaks.com/topic/72003-link-checker-and-speed-tester/#findComment-362745 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.