The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sending TEXT messages to cell phone

Discussion in 'General Discussion' started by asmithjr, Aug 9, 2004.

  1. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    Sending TEXT messages to cell phone (SMS)

    I worked a solution for a TEXT pageing program to send TEXT messages to a SPRINTPCS service.

    Thought I would share it to see if there are others.

    Code:
    #!/bin/sh
    # pager.sh
    # Al Smith 08.01.2004
    # SPRINT SMS paging program 
    # Requires wget
    # Required arguments are Company PagerNumber Message
    
    FILE=pager.html
    clear
    if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]
    then
            echo "usage: pager.sh CO PIN your message."
            echo "   ex: pager.sh A ########## this is my message."
            exit
    fi
    CO=$1
    PAGER=$2
    MSG=`echo $@ |cut -d" " -f3-`
    #echo $MSG
    
    # Set up the URL for the differnt providers
    SPRINT="http://messaging.sprintpcs.com/textmessaging/composeconfirm?phoneNumber=$PAGER&message=$MSG"
    
    # Write a pager.out file and a $FILE for logging and confirmations
    wget -o pager.out -O $FILE "$SPRINT"
    
    # Here we check our Pager Company (mostly for future use)
    case $CO in
        SPRINT) # search for conformation
            OK="Message Sent"
            grep "$OK" $FILE >/dev/null
            RC=$?
            case $RC in
                0 ) # Success
                    echo Success
                ;;
                *) # Failure
                    echo Failed
                ;;
            esac
    esac
    rm pager.out pager.html
    #
    # End
    #
    
    Lets work to provide others. Want to contibute?
     
    #1 asmithjr, Aug 9, 2004
    Last edited: Aug 9, 2004
  2. Parcye

    Parcye Well-Known Member

    Joined:
    May 19, 2004
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Eindhoven
    Nice idea!

    Any idea for what countries this works?

    How do you use the script?

    In the past many people used mtnsms.com to send sms messages, have you ever looked into that?
     
  3. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Well my cell phone support email and has its own email address with Rogers in Canada. So I just sent a short email to my phone email address and that's it!
     
  4. AlexF

    AlexF Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    16
    I've also got the same thing going. As a matter of fact, SprintPCS customers have their own email address. All I do is enter my SprintPCS address under WHM/contact manager where I am using the pager as the "1" priority alert and it works without a hitch.. ;)
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Thats nice. My server provider shut the service down because their server couldn't handle the load of mails coming in :mad:
     
  6. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    This particular script uses the SPRINT PCS website to send pages.

    Many emails arrive entirely to late to be ov any use. that is why the script came about. Yes Sprint does the email thing and sometimes they are hours later.

    The script will use their own website to send pages. It works just as if the user it typing in the message on their site. Now we all know that not all companies provide such a service but for those that do similar scripts can be written.
     
Loading...

Share This Page