2 Replies - 20629 Views - Last Post: 24 December 2008 - 09:16 AM Rate Topic: ***** 1 Votes

#1 nyajiv.jack   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-December 08

sending sms to mobile using php

Post icon  Posted 24 December 2008 - 07:54 AM

Hi friends i write the following code for sending sms to mobile using php

<?php

$request = "";

//initialise the request variable

$param[username] = "abcdef";

//this is the username of our xxxx account

$param[password] = "12345";

//this is the password of our xxxx account

$param[msg] = "This is sample message.";

//this is the message that we want to send


 $param[SenderID]= "vk"; //this is our sender if

$param[CDMAHeader] = "9999999999"; //we want to send the message via first class

$param[Message] ="message"; //this is the message that we want to send

$param[isFlash] = "false"; //we are only simulating a broadcast

foreach($param as $key=>$val)

//traverse through each member of the param array

{

$request.= $key."=".urlencode($val);

//we have to urlencode the values

$request.= "&"; :blink: 

//append the ampersand (&) sign after each paramter/value pair

}

$request = substr($request, 0, strlen($request)-1);

//remove the final ampersand (&) sign from the request
 

?>



***added code tags***
--jjsaw5

Is This A Good Question/Topic? 0
  • +

Replies To: sending sms to mobile using php

#2 jjsaw5   User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 3,063
  • Joined: 04-January 08

Re: sending sms to mobile using php

Posted 24 December 2008 - 09:06 AM

What is your question?

:code:
Was This Post Helpful? 0
  • +
  • -

#3 mavrck   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 14
  • Joined: 23-December 08

Re: sending sms to mobile using php

Posted 24 December 2008 - 09:16 AM

Just FYI for those viewing this thread-

SMS (text) and MMS (pictures, video, etc) can be sent via email addresses set up by each carrier. A listing of carriers and emails can be found at http://en.wikipedia....iki/SMS_gateway.

A simple carrier drop down box could direct the messages properly if you're looking to have a public web interface. I took this approach recently for a client.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1