Whats the fastest way to check if a url is a broken link?
I need to keep in mind that there are redirections too, so fopen doesn't work.
Broken Link?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
PM me... You sound like you're working on something very very similar to something I did recently for a client.
Can't remember if I checked for dead links but you'll need the URL parser I posted to you (to parse any redirects into absolute URLs) and then you use fsockopen() (or curl_() if you have it) to send HTTP requests to the server and see what's returned.
Come to think of it. Reading the headers alone (i did that too) will allow you to see if it exists or not.
Can't remember if I checked for dead links but you'll need the URL parser I posted to you (to parse any redirects into absolute URLs) and then you use fsockopen() (or curl_() if you have it) to send HTTP requests to the server and see what's returned.
Come to think of it. Reading the headers alone (i did that too) will allow you to see if it exists or not.