Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Checking "incomplete" URLs

by erikharrison (Deacon)
on Feb 20, 2002 at 05:03 UTC ( [id://146499]=note: print w/replies, xml ) Need Help??


in reply to Checking "incomplete" URLs

When you request a directory on a webserver the server gets to decide what to send you - usually index.html but not necesarily. This is straight ought of lwpcook.pod:

"If you just want to check if a document is present (i.e. the URL is valid) try to run code that looks like this:

use LWP::Simple; if (head($url)) { # ok document exists }

. . ."

. . . which is the "canonical" way to make sure a url is valid.

Cheers,
Erik

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://146499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2024-04-19 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found