Cupidvogel has asked for the wisdom of the Perl Monks concerning the following question:
use LWP::UserAgent; use HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new( file => "cookies.txt", autosave => 1, ); my $ua = LWP::UserAgent->new( agent => 'Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox +/14.0.1', cookie_jar => $cookie_jar, ); my $response = $ua->post( 'http://site2.way2sms.com/contentt/bar/Login1.action', { username => $user, password => $pass, } ); if ( $response->is_redirect ) { $response = $ua->get( $response->header('Location') ); print 5 if $response->decoded_content =~ /Kaustav Mukherjee/i; #pr +ints it, showing that the login is successful } my $smsresp = $ua->post("http://site5.way2sms.com/jsp/quicksms.action" +,[MobNo=>$mob,textArea=>'Hello World']);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Automating sms sending by through Way2sms in Perl
by pemungkah (Priest) on Aug 26, 2012 at 20:47 UTC |