I've got a few hundred links on a site I'm working on. I would like to be able to write a script that will detect whether the page is still there -- 404 detection or what not. I've no idea where to start on this one. Can someone steer me in the right direction or tell me it can't be done?
Thanks
Managing External Links
Moderator: General Moderators
- PHPadvisor
- Forum Newbie
- Posts: 11
- Joined: Mon Dec 13, 2004 3:20 pm
- PHPadvisor
- Forum Newbie
- Posts: 11
- Joined: Mon Dec 13, 2004 3:20 pm
get_headers() could work, with PHP5. If you are using PHP4 still, this might be useful...
Code and example given out like this as this board didn't like me posting it... =/
Credits should go to cpurruc fh-landshut de on the get_headers() comments list @ php.net, allthough I rewrote it slightly to correct errors being reported with $url_info['query']
Code and example given out like this as this board didn't like me posting it... =/
Credits should go to cpurruc fh-landshut de on the get_headers() comments list @ php.net, allthough I rewrote it slightly to correct errors being reported with $url_info['query']