ï

Thanks a lot for the prompt responses.
 
I still have a few queries:
 
1) How SMSGateway communicates with SMSCenter?
 
2) How implementation for communicating  SMSCGateway to SMSCenter using SMPP protocol is done.
 
3) How SMSGateway determines from a cell number as to
which SMSC protocol is to be used?
 
Best regards,
 
Jatul
----- Original Message -----
From: sean
To: JAtul
Sent: Monday, November 22, 2004 4:20 PM
Subject: Re: Urgent help needed

Hi Jatul,

I have written PHP code to send SMS to Clickatell. The other providers nearly all use the same system. Ie HTTP post.
My program stores messages and user details in a MySQL database, but that is a matter of personal preference

Here is some API and PHP sample code from Clickatel that might help you.


CFM

Page 1.

<form action="" method="post">

To:<input type="Text" name="to"><br><br>

Message:<input type="text" name="text">

<br><br><input type="submit" value="send">

</form>


Page 2.

<cfoutput>

<cfhttp url="" method="POST" resolveurl="false">

<cfhttpparam type="FORMFIELD" name="api_id" value="xxxxxxx">

<cfhttpparam type="FORMFIELD" name="user" value="xxxxxxx">

<cfhttpparam type="FORMFIELD" name="password" value="xxxxxxx">

<cfhttpparam type="FORMFIELD" name="text" value="#form.text#">

<cfhttpparam type="FORMFIELD" name="to" value="#form.to#">

</cfhttp>

</cfoutput>


PHP

<?

$user = "user";

$password = "password";

$api_id = "xxxx";

$baseurl ="http://api.clickatell.com";

$text = urlencode("This is an example message");

$to = "0123456789";

// auth call

$url = "";

// do auth call

$ret = file($url);

// split our response. return string is on first line of the data returned

$sess = split(":",$ret[0]);

if ($sess[0] == "OK") {

$sess_id = trim($sess[1]); // remove any whitespace

$url = "";

// do sendmsg call

$ret = file($url);

$send = split(":",$ret[0]);

if ($send[0] == "ID")

echo "success<br>message ID: ". $send[1];

else

echo "send message failed";

} else {

echo "Authentication failure: ". $ret[0];

exit();

}

?>

Good luck with your project and please feel free to contact me at any time if you require any further help.


Regards,


Sean Bracken

System Admin..
Crowngate Ltd.


54 Parkwest Enterprise Centre


Nangor Road


Dublin 12, Ireland


Phone +353 86 3448097


Fax  +353 1 6208505


http://topup.ie [EMAIL PROTECTED]

Reply via email to