Sending sms using php script

3 replies
Hello

I am looking for a script which can be used to send international sms , can anyone guide me for it?

Thank you
#php #script #sending #sms
  • Profile picture of the author Daniel44
    Hi There,

    I haven't played with it much, but i use this SMS API to send messages:

    Cant post links yet, but google for: tm4b sms api

    You need to do it through a HTTP request, PHP has a number of ways to this, fsockopen() and curl being just a few.

    Dan
    {{ DiscussionBoard.errors[2370201].message }}
  • Profile picture of the author heroic
    Hi, First you need to get in touch with someone who can provide you with an API for sending SMS, then all that is left is to call their API via the methods already mentioned Daniel. You can also use file_get_contents, though i'd recommend using cURL.
    {{ DiscussionBoard.errors[2370231].message }}
    • Profile picture of the author Itamar
      Hi,

      There are a lot of companies who can do this for you.

      You on your behalf (inside your php code) will simply have to use a piece of software they will give you , called API
      (application programming interface)

      which is basically a library of their code (that they will supply) that contacts their servers to send the SMS.

      In most cases you simply let the API know your account id or something of that kind and then can request simply to send an SMS.

      Just to take it into real life exmple for a second , an API call can be something like this:

      $obj = new SMSProviderAPI();
      $obj->sendSMS("your sms message", $phone, 0.5);

      Which is the message , phone number to send the info to and the optional charge for reverse billing.

      But this is again , just an examlpe of how an API call can look like so you get more understanding of how it works.
      {{ DiscussionBoard.errors[2385316].message }}

Trending Topics