Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 chanting in the Monastery: (4)
As of 2014-11-01 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (229 votes), past polls