Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: grabbing webpage data w/o additional modules

by ImpalaSS (Monk)
on Nov 22, 2000 at 21:08 UTC ( [id://42969]=note: print w/replies, xml ) Need Help??


in reply to Re: grabbing webpage data w/o additional modules
in thread grabbing webpage data w/o additional modules

Hey,
I was reading that link you provided, and i noticed this:
$sock = IO::Socket::INET->new(PeerAddr => 'www.perl.org', PeerPort => 'http(80)', Proto => 'tcp');
So, can i change the www.perl.org to www-mat.nextel.com but how can i route it to a certian directory, and on top of that, to a script with certian parameters?
Thanks again

Dipul

Replies are listed 'Best First'.
Re: Re: Re: grabbing webpage data w/o additional modules
by Fastolfe (Vicar) on Nov 22, 2000 at 21:14 UTC
    You need to learn to speak HTTP. All IO::Socket does is help you establish network connections. It doesn't do anything as far as the protocol you use on top of that connection (HTTP). After you establish your connect, you need to send a properly formatted HTTP request (e.g.:
    GET /some/directory/file/script.whatever?arguments HTTP/1.0 Host: www.example.com
    And parse the response headers that you get in reply:
    HTTP/1.1 500 Internal Server Error Server: whatever Content-type: text/html My bad.
    See http://www.w3.org/ for details on the HTTP protocols, or examine the LWP and/or the HTTP set of modules for information. You are FAR better off finding a way to use an existing module. Good luck.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found