Re[2]: sendsms HTTP 202 status response

Jury Cherepanov <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization HighTech
Message-ID <[email protected]>
Hello Angel,

Sunday, April 20, 2003, 12:26:51 PM, you wrote:

>>everything is OK execpt using some "user-friendly" languages, such as php.
AF> for example, putting the whole >sendsms URL
>>into include() function produces the following warnings:
>>
>>Warning: main(http://xxx:13013/cgi-bin/sendsms?
>>user=test&pass=testing&to=xxx&from=xxx&udhtext=test&smsc=xxx)
AF> [function.main]: failed to create stream:
>>HTTP >request failed! HTTP/1.0 202 Foo in /var/www/xxx/test.php on line 100
>>
>>Warning: main() [function.main]: Failed opening
AF> 'http://xxx:13013/cgi-bin/sendsms?
>>user=test&pass=testing&to=xxx&from=xxx&&text=test&smsc=xxx for inclusion
>>(include_path='.:/usr/local/lib/php') in /var/www/xxx/test.php on line 100
>>
>>if require() is used instead of include(), GET request is passed (SMS is
AF> sent), but script will die (due to >require() semantics).
>>
>>shouldn't be repsonse changed into "normal", i.e. 200?
>>

AF> This is PHP fault, it does show that warning for include() or even file()
AF> function if status code is not 200. But a 202 status is also a valid success
AF> code, and more accurate in our case. You'll have to use another http client
AF> for php (Snoopy is a good one for example) or turn warnings off when you
AF> include() or file() that url.

AF> You don't know in advance if the message will be delivered (mobile terminal
AF> switched off for example, and validity expires).

AF> When a proper bearerbox/smsbox ack/nack handling is implemented, we will be
AF> able to return failure status codes for some conditions, for example, smsc
AF> not found and such. But still will have to return 202 when the message is
AF> delivered to the provider.

AF> Angel Fradejas
AF> Mediafusiуn Espaсa, S.A.
AF> [email protected]
AF> www.mediafusion.es
AF> Tel. +34 91 252 32 00
AF> Fax +34 91 572 27 08

May be you can use your own writed HTTP protocol handler :) Why Not
????

Just Send Request and Read Response with Resp Codes.
In php that may be func. fsockopen(), fread(), fwrite(), fclose().

That you be able to communicate with Kannel (HTTP/1.0 202 OK) :)

---------------------------------------------------------
Jury Cherepanov
System Developer (Technical Director) , HIGH TECHNOLOGIES
Turaidas 2a, Riga, Latvia
Phone +371-9633398
mailto:[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.