The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Net::SMS::Web - a generic module for sending SMS messages using web2sms gateways (e.g. or


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).


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;


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.


This method gets the body of the response to the previous 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 can be submitted to the CPAN RT bug tracker either via email ( or web There is also a sourceforge project at


Ave Wrigley <>


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.