in reply to How to send text msg with perl??

There are SMS modules if you search CPAN, but with so many SMS servers already on the web, I would probably find one that doesn't mind you using it as a gateway, and interface with it via WWW::Mechanize.


Dave

Replies are listed 'Best First'.
Re^2: How to send text msg with perl??
by maietta (Initiate) on Oct 16, 2008 at 01:36 UTC
    Unfortunately for most "programmers", they resort to relying on modules for everything: Here's what I did to get this working in the past... but I must warn you.. that if US Cellular changes their page... it could break the script.

    If you view the HTML of US Cellular's SMS Gateway page (found on their website), you'll notice a random session number. You'll need this when you actually submit the request to broadcast the SMS.

    Second, you'll simply perform 2 "GET" or "POST" requests, but do whatever the form on their site does.

    Third, ensure you will pass the proper variables... such as the check box saying you have read the terms

    Fourth, be sure to set a referrer and user agent string in your script for the request to match typical behavior of any normal web surfer... such as a Browser user agent string found for IE, Firefox, et cetra.

    Fourth, don't ruin this for everyone. If they detect a tonne of traffic or abuse, they might decide to redesign their SMS interface to require a captcha... preventing you from developing a script and using it.

    Fifth, if you do abuse the system, I WILL HUNT YOU DOWN AND REPROGRAM YOU AND YOUR COMPUTER.

    If everyone is wondering why I didn't provide a script, it's because I see these things abused all the time... and if you are serious about using for personal use (instant notification of a successful telnet session... for example)... then you are definately smart enough to learn to use the LWP::Simple methods.. which are all you really need for this small task.