P is for Practical | |
PerlMonks |
Re: checking for valid http linksby hardburn (Abbot) |
on Aug 14, 2003 at 19:50 UTC ( [id://283985]=note: print w/replies, xml ) | Need Help?? |
The HTTP/1.1 specification requires all web servers to implement two methods: GET and HEAD. If you've done much CGI programming, you already know what GET does. HEAD gives you all the headers that would be sent in a GET, but without sending the actual data. At least, it will as long as your web server was coded properly (I've seen weird cases where a server does send the data in a HEAD, but I don't remember how it happend). So, you just need to change from a GET request to a HEAD. ---- Note: All code is untested, unless otherwise stated
In Section
Seekers of Perl Wisdom
|
|