Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks
Basically i have created a socket of the type
User-Agent header and check the log files, i am not getting it
. The user agent is getting printed as it is
Can anyone help me
Thanks in advance
Basically i have created a socket of the type
I have used yahoo just for ex sake. When i give the#!/usr/bin/perl use IO::Socket; $sock = new IO::Socket::INET ( PeerAddr => 'www.yahoo.com', PeerPort => 80, Proto => 'tcp', Timeout => 10, ); die "Socket could not be created $!\n" unless $sock; print $sock "GET /page?pg=somewhere.html HTTP /1.0\nUser-Agent: Mozil +la/4.0 (compatible; MSIE 5.01; Windows 98; ocnie5-1)\nContent-Type: t +ext/html; charset=EUC-JP\n\n"; while($line = <$sock>) { print "$line\n"; } exit 0;
User-Agent header and check the log files, i am not getting it
. The user agent is getting printed as it is
I suppose there is some thing wrong with the format of User-Agent.2 I-1373-067 User-Agent: Mozilla/4.0 (compatible; MSI +E 5.01; Windows 98; ocnie5-1)
Can anyone help me
Thanks in advance
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: User-Agent
by pg (Canon) on Mar 27, 2003 at 03:08 UTC | |
Re: User-Agent
by blokhead (Monsignor) on Mar 27, 2003 at 02:39 UTC | |
by Anonymous Monk on Mar 27, 2003 at 02:43 UTC | |
by newrisedesigns (Curate) on Mar 27, 2003 at 02:46 UTC |
Back to
Seekers of Perl Wisdom