NAME
Net::SMS::Web - a generic module for sending SMS messages using web2sms gateways (e.g. http://www.mtnsms.com/ or http://www.o2.co.uk/).
DESCRIPTION
A perl module to send SMS messages, using web2sms gateways. This module should be subclassed for a particular gateway (see Net::SMS::O2 or Net::SMS::Mtnsms).
When you subclass this class, you need to make a series of calls to the action method, passing a Net::SMS::Web::Action object which should correspond to the web form acions that are required to send an SMS message via the web gateway in question.
The HTTP requests are sent using the LWP::UserAgent module. If you are using a proxy, you may need to set the HTTP_PROXY environment variable for this to work (see LWP::UserAgent).
CONSTRUCTOR
The constructor of this class can be overridden in a subclass as follows:
sub new
{
my $class = shift;
my $self = $class->SUPER::new( @_ );
$self->_init( @_ );
return $self;
}
METHODS
cookie( $key )
This method gets the value of a cookie that has been set either in a previous action, or in a redirected Location resulting from one of those actions.
response()
This method gets the body of the response to the previous action.
action
This method takes an Net::SMS::Web::Action object as an argument, and performs the corresponding action. It takes care of retention of cookies set by previous actions, and follows any redirection that result from the submission of the action.
BUGS
Bugs can be submitted to the CPAN RT bug tracker either via email (bug-net-sms-web@rt.cpan.org) or web http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-SMS-Web. There is also a sourceforge project at http://sourceforge.net/projects/net-sms-web/.
AUTHOR
Ave Wrigley <Ave.Wrigley@itn.co.uk>
COPYRIGHT
Copyright (c) 2001 Ave Wrigley. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.