Hi All On receiving no reply to my previous post, I myself struggled a bit and came up with the following code to login to the site :
-------------------------------------------------------------- use LWP::UserAgent; use HTTP::Cookies; $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt",autosave => 1)); my $req = HTTP::Request->new(POST => 'http://www.sms.ac/login.asp'); $req->content_type('application/x-www-form-urlencoded'); $req->content('loginuserid=myuserid&loginpassword=mypassword'); my $res = $ua->request($req); print $res->as_string; -------------------------------------------------------------- However, on running this script, a web page with the following message is returned : Unable to establish login (cookies rejected). Could someone please guide me how to overcome this. Thanks in anticipation, aman -----Original Message----- From: Aman Thind [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 2:05 PM To: [EMAIL PROTECTED] Subject: Log into a site and do stuff Hi I am working on a module that occasionally needs to raise alarms by sending sms to concerned ppl. For this, I would like to login to the site : www.sms.ac The login page is http://www.sms.ac/login.asp Then I have to go to the main page , fill the To: and Message: textboxes and send sms. I have no prior experience with LWP and couldn't make much use of "perldoc lwpcook" Could someone please tell me how I can accomplish this feat. A pointer towards a newbie resource on this perl feature or some sample code will surely help. Thanks aman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]