Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Answer: How can my tcp client call a sub directory when calling a socket connection?

( #410741=categorized answer: print w/ replies, xml ) Need Help??

Q&A > HTTP and FTP clients > How can my tcp client call a sub directory when calling a socket connection? contributed by scottknight

This seems to work for me (though I am having bad luck with a D-Link modem at the moment):
my $sock = IO::Socket::INET->new( PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => 5 ); unless ($sock) { $errormessage = $tr{'could not connect to http://$host:$port/$filen +ame'}; return '0'; } $sock->print("GET /".$filename." HTTP/1.0\r\n");

Comment on Answer: How can my tcp client call a sub directory when calling a socket connection?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-12-28 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls