if($cf_gateway=="Gateway1")
{
$status = @file("http://gateway/?key=".$smskey."&Text=".urlencode($text)."&handynr=".$nummer."&service=low");

if (trim($status[0]) == "100")
{
$meldung = "<font style=\"color:green\"><b>Die SMS wurde an ".$nummer." gesendet.</b></font>";
}
elseif ($status[0] == "200")
{
$meldung = "<font style=\"color:red\">Die angegebene Handynummer ist nicht im korrekten Format. Bitte gehen Sie zurück und verändern Sie die Eingabe.</font>";
}
else
{
$meldung = "<font style=\"color:red\">Die SMS konnte auf Grund eines technischen Fehlers leider nicht versendet werden.</font>";
}
}
elseif($cf_gateway=="Gateway2")
{
$key = $cf_smskey;
$key_pw = $cf_smspw;
$_SESSION['sms'] = 1;
$code = @file("http://URL/sms/gateway/script.php?id=".$key."&pw=".$key_pw."&empfaenger=".urlencode($nummer)."&type=13&text=".urlencode($te xt)."");

$meldung = "<font style=\"color:green\"><b>Die SMS wurde an ".$nummer." gesendet.</b></font>";
}

echo $meldung;
Ich möchte einen 3ten Gateway (von unten)im Code (oben) einbauen..
Ich hoffe jemand kann mir helfen


Hilfe-Datei:
J2ME/HTTP SMS Client-Server Connect Gateway
This document is intended to provide information about J2ME/HTTP SMS client server
content parameter and standard response against each request.
Content
1.
User Verification
2.
SMS Send
3.
Delivery Report
4.
Report (MIS)
Access to the gateway for content verification is via internet. The gateway offers different
url’s for different -2 content which will connected to the server to process the information.
Valid method to connect to the gateway are GET or POST. To ensure security you will
be given a username and password that is specific to user account.
Content Detail
1.
User Verification
The url is:
POST URL http://url:8080/server/login/
GET URL
http://url:8080/server/login/?login=user&password=pass
Login url parameter:
login
->
Client userid.
Password
->
Client password.
Each parameter will be separated by &
Page 2
HTTP – API
------------------------------------------------------------------------
Page 2
6/8/2008
Login url response:
a.)
If userid and pass value matched
Resp: status=1&credit=100&client=dj8El0p&permission=1&sender=Bineet
status=1
->
Login valid
credit=100
->
User credit remaining
client=dj8E10p
->
Client ID
permission=1
->
Reg User, if 0 then Demo User
sender=Bineet
->
Default From
b.)
If server connection NULL
Resp: status=0&message=Server-Connection-NULL
status=0
->
Server Connection NULL
message=Server-
->
Standard Reply Message
Connection-
NULL
c.)
If user not exist or userid and pass not matched
Resp: status=0&message=User-Invalid
status=0
->
Login Invalid: User Not Exist with userid and pass values
message=User-
->
Standard Reply Message
Invalid
d.)
If user not active
Resp: status=0&message=User-Not-Authorized
Page 3
HTTP – API
------------------------------------------------------------------------
Page 3
6/8/2008
status=0
->
User Not Active
message=User-
->
Standard Reply Message
Not-
Authorized
e.)
If user credit are less or empty
Resp: status=0&message=Credit-Less
status=0
->
User Credit Are Less
message=Credit-
->
Standard Reply Message
Less-
g.)
If any parameter is missing
Resp: status=0&message=Parameter-Missing
status=0
->
Parameter missing status
message=Parameter ->
Standard Reply Message
Missing
h.)
If No parameter
Resp: visit: www.test.com
2.
SMS Send
The url for TEXT or UCS:
TEXT
-
Text Message (160 chars per msg)
UCS
-
Unicode Message (70*4 chars)
POST URL http://IP:8080/server/sendsms/
GET URL TEXT
http://IP:8080/server/sendsms/?login...rd=bikram&clie
Page 4
HTTP – API
------------------------------------------------------------------------
Page 4
6/8/2008
ntid=ty5T9800&receiver=9198xxxxxxxx&message=Hello me
fine&message_type=TEXT&sender=Bikram
GET URL UCS
http://IP:8080/server/sendsms/?login...rd=bikram&clie
ntid=ty5T9800&receiver=9198xxxxxxxx&message=<ucs-
msg>&message_type=UCS&sender=Bikram
The url for CTEXT or CUCS:
CTEXT
-
Concatenated Text Message (like 2 sms delivered as 1 )
CUCS
-
Concatenated Unicode Message (like 2 unicode sms delivered as 1)
POST URL http://IP:8080/server/sendsms/
GET URL TEXT
http://IP:8080/server/sendsms/?login...rd=bikram&clie
ntid=ty5T9800&receiver=9198xxxxxxxx&message=Hello me
fine&message_type=CTEXT&sender=Bikram
GET URL UCS
http://IP:8080/server/sendsms/?login...rd=bikram&clie
ntid=ty5T9800&receiver=9198xxxxxxxx&message=<ucs-
msg>&message_type=CUCS&sender=Bikram
The url for WAPB or BCARD or PICT or RING or LOGO or RTTTL:
POST URL http://IP:8080/server/sendsmsxp/
GET URL
http://IP:8080/server/sendsmsxp/?
Page 5
HTTP – API
------------------------------------------------------------------------
Page 5
6/8/2008
GET URL BOOKMARK
http://IP:8080/server/sendsmsxp/?log...word=bikram&cl
ientid=ty5T9800&receiver=9198xxxxxxxx&message=SMS-
URL\nwww.positivecomsol.com&message_type=WAPB&sender=Bikram
GET URL BUSINESS CARD
http://IP:8080/server/sendsmsxp/?log...word=bikram&cl
ientid=ty5T9800&receiver=9198xxxxxxxx&message=Bikram\n919810000000&message
_type=BCARD&sender=Bikram
GET URL PICTURE/LOGO/RING/RTTTL
http://IP:8080/server/sendsmsxp/?log...word=bikram&cl
ientid=ty5T9800&receiver=9198xxxxxxxx&message=<respected binary
value>&message_type=<respected message type as defined above>&sender=Bikram
WAPB
-
Bookmark Message
BCARD
-
Business Card Message
PICT
-
Picture Message
RING
-
Ring Tone
LOGO
-
Logo
RTTTL
-
Mono Ring Tone
WAPB: In Bookmark case the message will contain Bookmark Title & URL and both
will be separated by new line character “\n” like
SMS-URL
http://www.sms.com
BCARD: In Business card case the message will contain BC Name & BC Mobile and
these both will also be separated by new line character “\n” like
Bineet
919811100000
Parameter to send
Each parameter will be separated by &
Page 6
HTTP – API
------------------------------------------------------------------------
Page 6
6/8/2008
*login
->
Client Userid
*password
->
Client password
*clientid
->
Client Client-ID
*receiver
->
Receiver mobile numbers (country code+mobile number). If more
than one then separated by comma (,)
*message
->
Message content
*message_type ->
Message type. Default ‘TEXT’
*sender
->
Sender Name or Alias will be use against his userid
remoteip
->
Sender Machine IP
tmstamp
->
Message scheduling values (yyyyMMddHHmmssmmm)
network
->
User network to send. Default user stored network.
All parameter with * are mandatory to send. Remoteip, tmstamp and network field are
optional to send. If user want to schedule any message at specific date and time then he
has to add tmstamp values into smssend url.
tmstamp = 20050509142000000 (yyyyMMddHHmmssmmm)
Smssend url reponse:
a.)
If successfully received
Resp: status=1&credit=609&message=SENT-919811100000,
7272YGH90-919811100001,7282GHY9DESTERR-
919811200000,919811300000
status=1
->
Successfully Received status
credit= 609
->
Updated credit after sent
message=SENT
->
This will display the final status of message for each
receiver First SENT-919811100000 then it will give
MSGID 7272YGH90 seprated by comma then again
hyphen (-) for another sent mobile. Tilda () will be used
for separating DESTERR receivers and each numbers will
be separated by comma (,).
b.)
If server connection null
Page 7
HTTP – API
------------------------------------------------------------------------
Page 7
6/8/2008
Resp: status=0&message=Server-Connection-NULL
status=0
->
Server Connection NULL status
message=Connection ->
Standard Message
NULL
c.)
If Given userid and pass are not matched
Resp: status=0&message=User-invalid
status=0
->
Invalid user status
message=User-
->
Standard Message
invalid
d.)
If client-id is incorrect
Resp: status=0&message=Client-Error
status=0
->
Incorrect clientid status
message=Client-
->
Standard Message
Error
e.)
If user not active
Resp: status=0&message=User-Not-Authorized
status=0
->
User Not Active status
message=User-
->
Standard Reply Message
Not-
Authorized
f.)
If user credit are less
Resp: status=0&message=Credit-Less
status=0
->
User Credit Are Less status
message=Credit-
->
Standard Reply Message
Less-
Page 8
HTTP – API
------------------------------------------------------------------------
Page 8
6/8/2008
g.)
If any parameter is missing
Resp: status=0&message=Parameter-Missing
status=0
->
Parameter missing status
message=Parameter ->
Standard Reply Message
Missing
h)
If some error occurred while executing database statement
Resp: status=0&message=DBERROR
status=0
->
Parameter missing status
message=DBERROR ->
Standard Reply Message
i)
If receiver network not found against user id
Resp: status=0&credit=609&message=DESTERR-919811200000
status=0
->
Parameter missing status
credit=609
->
Same last credit
message=DESTERR ->
Standard Reply Message
j.)
If No parameter
Resp: visit: www.url.com
3.
Delivery Report
The url is:
POST URL http://IP:8080/server/deliv/
Page 9
HTTP – API
------------------------------------------------------------------------
Page 9
6/8/2008
GET URL
http://IP:8080/server/deliv/?login=b...ikram&clientid
= ty5T9800&msgid=45gsysh7829
Parameter to send
Each parameter will be separated by &
*login
->
Client Userid
*password
->
Client password
*clientid
->
Client Client-ID
*msgid
->
Unique Message ID. If message id more then one then separated
by comma(,).
All parameter with * are mandatory to send.
Delivery Report url Response
a.)
If successfully recieved
Resp: status=1&message=7272YGH90,919811100000,3,20050509141050999
If more than one and second msgid is incorrect
Resp: status=1&message=7272YGH90,919811100000,3,200505091410509997272YG
H91,Not-Found
status=1
->
Successfully processed status
message=
7272YGH90
->
msgid
919811100000
->
mobile
3
->
status
20050509141050999 ->
delivery timestamp
->
separation for another record
Note: In single message id query if msgid not found then status would be 0. and in more
than one if any msgid found then status would be 1.
Page 10
HTTP – API
------------------------------------------------------------------------
Page 10
6/8/2008
b.)
If server connection null
Resp: status=0&message=Server-Connection-NULL
status=0
->
Server Connection NULL status
message=Connection ->
Standard Message
NULL
c.)
If Given userid and pass are not matched
Resp: status=0&message=User-invalid
status=0
->
Invalid user status
message=User-
->
Standard Message
invalid
d.)
If client-id is incorrect
Resp: status=0&message=Client-Error
status=0
->
Incorrect clientid status
message=Client-
->
Standard Message
Error
e.)
If user not active
Resp: status=0&message=User-Not-Authorized
status=0
->
User Not Active status
message=User-
->
Standard Reply Message
Not-
Authorized