Specification V3.4:
http://www.smpp.org/doc/public/
Rodrigo.
----- Original Message -----
From: "JAtul" <[EMAIL PROTECTED]>
To: "sean" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Monday, November 22, 2004 10:00 AM
Subject: Re: Urgent help needed
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 <mailto:[EMAIL PROTECTED]>
To: JAtul <mailto:[EMAIL PROTECTED]>
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="Page2" 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="http://api.clickatell.com/http/sendmsg" 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 =
"$baseurl/http/auth?user=$user&password=$password&api_id=$api_id";
// 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 = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text";
// 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]
Este mensaje se dirige exclusivamente a su destinatario y puede
contener
informaci�n CONFIDENCIAL sometida a secreto profesional o cuya
divulgaci�n
est� prohibida en virtud de la legislaci�n vigente. Si ha recibido
este
mensaje por error, le rogamos que nos lo comunique inmediatamente por
esta
misma v�a o por tel�fono (54.11 5776-5000) y proceda a su destrucci�n.
N�tese que el correo electr�nico v�a Internet no permite asegurar ni
la
confidencialidad de los mensajes que se transmiten ni la correcta