My Perl code:
#!/usr/bin/perl -w
use HTTP::Cookies;
use HTTP::Request::Common;
use LWP::UserAgent;
$ua = new LWP::UserAgent;
if(! $ua)
{
print "Can not get the page :UserAgent fialed \n";
return 0;
}
my $cookies=new HTTP::Cookies(file=>'./cookies.dat',autosave=>1);
$ua->cookie_jar($cookies);
# push does all magic to exrtact cookies and add to header for further reqs.
useragent should be newer
push @{ $ua->requests_redirectable }, 'POST';
$result = $ua->request(POST " http://erail.in http://erail.in ");
print $result;
______________
Through this program i am not able to capture the Session id/cookie value
from the opened site(in the script)
I am getting this output: HTTP::Response=HASH(0xacc640)
Please suggest me how to capture the session-id....
Thanks,
Lakshmi Sreekanth
--
View this message in context:
http://www.nabble.com/Capture-sessionID-in-browser-from-perl-script-tp22822820p24106307.html
Sent from the Apache - Asp mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]