Today around 3:05pm, rucan hebele hammered out this masterpiece:
: this is part of my homework. i need help. pls answer my previous message:
I think I speak for everyone when I say that we won't _do_ your homework for
you.
I am more than happy to point you to resources, though.
perldoc CGI::Cookies
perldoc HTTP::Cookies
perldoc LWP::UserAgent
: rucan hebele <[EMAIL PROTECTED]> wrote:
: hi,
: i have cookie problem. i am working on it last 5 days and i am tired.
: i have read e-mail lists and documents. but i cant solve my problem.
:
: first, look at this page: http://www.clickzones.com/cookiejs_test.php3
: here is my script for testing:
:
:
: #!/usr/bin/perl
:
: use LWP::UserAgent;
: use HTTP::Headers;
: use HTTP::Cookies;
:
: $ua = new LWP::UserAgent;
: $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)');
:
: #my $jar = HTTP::Cookies->new;
: $jar = new HTTP::Cookies( ignore_discard => 1 );
: $ua->cookie_jar($jar);
:
: $headers1 = new HTTP::Headers
: 'Accept' => 'image/gif, image/x-xbitmap, image/jpeg,
: image/pjpeg, */*',
: 'Accept-Encoding' => 'gzip, deflate',
: 'Accept-Language' => 'en',
: 'Referer' =>
: 'http://www.clickzones.com/cookiejs_test.php3',
: 'Connection' => 'Keep-Alive',
: 'content_type' => 'application/x-www-form-urlencoded'
: ;
:
: $headers = new HTTP::Headers
: 'Accept' => 'image/gif, image/x-xbitmap, image/jpeg,
: image/pjpeg, */*',
: 'Accept-Encoding' => 'gzip, deflate',
: 'Accept-Language' => 'en',
: 'Referer' => 'http://www.ucuzweb.com/kukupoke/',
: 'Connection' => 'Keep-Alive',
: ;
:
: # Request for get cookies
: $req = new HTTP::Request('GET',
: 'http://www.clickzones.com/cookiejs_test.php3', $headers);
: my $res = $ua->request($req);
:
: #Send cookies via POST - i am clicking button :-)
: $req = new HTTP::Request('POST',
: 'http://www.clickzones.com/cookiejs_test.php3',
: $headers1, 'output=Is+Javascript+supported%3F%3F%3F');
: my $res=$ua->request($req);
:
: $list=$res->content;
:
: open(OUTF, ">log.log") or die("Log file cant open.");
: print OUTF "$list";
: close(OUTF);
:
: if (($res->is_success) and ($res->content=~/is enabled/))
: {print " ****** working ******\n";
: }
:
:
:
: i want this scripts output writes ****** working ****** .
: pls change codes and do this.
:
: regards,
: RUCan
:
:
:
:
: ____________________________________________________________________
: Get free email and a permanent address at http://www.netaddress.com/?N=1
:
--
print(join(' ', qw(Casey R. Tweten)));my $sig={mail=>'[EMAIL PROTECTED]',site=>
'http://home.kiski.net/~crt'};print "\n",'.'x(length($sig->{site})+6),"\n";
print map{$_.': '.$sig->{$_}."\n"}sort{$sig->{$a}cmp$sig->{$b}}keys%{$sig};
my $VERSION = '0.01'; #'patched' by Jerrad Pierce <belg4mit at MIT dot EDU>