.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "WWW::SMS::o2UK 3" .TH WWW::SMS::o2UK 3 2023-07-26 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SS Install .IX Subsection "Install" .Vb 1 \& perl modules can be found at http://search.cpan.org/ .Ve .SS openssl .IX Subsection "openssl" .Vb 1 \& get the latest openssl from http://www.openssl.org \& \& linux:/usr/src # tar \-zxvf openssl\-0.9.6g.tar.gz \& \& $ ./config \& $ make \& $ make test \& $ make install .Ve .SS NET::SSL .IX Subsection "NET::SSL" .Vb 6 \& get latest Net::Ssl from http://search.cpan.org/author/CHAMAS/ \& linux:/usr/src # tar \-zxvf Crypt\-SSLeay\-0.45.tar.gz \& > perl Makefile.PL \& > make \& > make test \& > make install \& \& and test it :\-) \& \& # lwp\-request https://www.nodeworks.com \& \& use LWP::UserAgent; \& my $ua = new LWP::UserAgent; \& my $req = new HTTP::Request(\*(AqGET\*(Aq, \*(Aqhttps://www.nodeworks.com\*(Aq); \& my $res = $ua\->request($req); \& print $res\->code."\en"; \& \& res code should be 200 in case of success .Ve .SS WWW::SMS .IX Subsection "WWW::SMS" .Vb 1 \& get latest Www::Sms from http://search.cpan.org/author/GIULIENK/ \& \& update SMS.pm with the new provider if wanted \& copy o2UK.pm into your /WWW/SMS/ perl library directory, e.g. into: \& linux:/usr/lib/perl5/site_perl/5.6.1/WWW/SMS> \& \& you have to sign up with O2 http://www.o2.co.uk/ (previous genie) \& which is free at the moment and you can send 100 sms/month free \& you have to pass the username/password or the file which contains it \& dunno all the sim cards provided yet: o2 and vodafone work \& \& and test it :\-) \& \& use WWW::SMS; \& #international prefix, operator prefix, phone number, message text \& my $sms = WWW::SMS\->new(\*(Aq44\*(Aq, \*(Aq7777\*(Aq, \*(Aq123456\*(Aq, \*(AqThis is a test.\*(Aq,\*(Aqusername\*(Aq => \*(Aqyour_o2_username\*(Aq, \*(Aqpassword\*(Aq => \*(Aqyour_o2_password\*(Aq); \& for ( $sms\->gateways() ) { \& print "Trying $_...\en"; \& if ( $sms\->send($_) ) { # try to send a sms... \& last; # until it succeds ;) \& } else { \& print $WWW::SMS::Error; # unlucky! \& } \& } .Ve