Connecting Tech Pros Worldwide Forums | Help | Site Map

Getting the HTTP response code that is sent via a cell phone

jl
Guest
 
Posts: n/a
#1: Sep 8 '06
I have a J2ME cell phone application that via the AMS (Application
Manager) delivers a status report to my server indicating whether the
suite was successfully installed and identifying the reason for failure
if it was not.

This report takes the form of a status code and a status message that
is sent using an HTTP POST request to the URL given by the
MIDlet-Install-Notify attribute in the JAD file.

I'm having a hard time finding out how to get to the HTTP POST request
status code that is sent to the server from the cell phone.

All of the examples that I see for request, response, originate from
the server. But I don't have a "hook". For example, the following code
has the $url variable to pass to file_get_contents. :

$contents = file_get_contents($url);

However, in my case, the server is just receiving the code but it is
not originating the communication.

Will someone please post the PHP code for this or at least a few hints
as to how to begin?

Thanks,
jl


Alvaro G. Vicario
Guest
 
Posts: n/a
#2: Sep 8 '06

re: Getting the HTTP response code that is sent via a cell phone


*** jl escribió/wrote (8 Sep 2006 04:30:04 -0700):
Quote:
I'm having a hard time finding out how to get to the HTTP POST request
status code that is sent to the server from the cell phone.
Not being 100% sure of your exact needs (cell phones are way too
complicated for me xD) I may suggest cURL functions:

http://www.php.net/curl

For instance, curl_getinfo() has the "CURLINFO_HTTP_CODE" option that
allows you to get the "Last received HTTP code". In any case, if it has to
do with HTTP and you can't do it with curl, bad thing ;-)


--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Jerry Stuckle
Guest
 
Posts: n/a
#3: Sep 9 '06

re: Getting the HTTP response code that is sent via a cell phone


jl wrote:
Quote:
I have a J2ME cell phone application that via the AMS (Application
Manager) delivers a status report to my server indicating whether the
suite was successfully installed and identifying the reason for failure
if it was not.
>
This report takes the form of a status code and a status message that
is sent using an HTTP POST request to the URL given by the
MIDlet-Install-Notify attribute in the JAD file.
>
I'm having a hard time finding out how to get to the HTTP POST request
status code that is sent to the server from the cell phone.
>
All of the examples that I see for request, response, originate from
the server. But I don't have a "hook". For example, the following code
has the $url variable to pass to file_get_contents. :
>
$contents = file_get_contents($url);
>
However, in my case, the server is just receiving the code but it is
not originating the communication.
>
Will someone please post the PHP code for this or at least a few hints
as to how to begin?
>
Thanks,
jl
>
If it's sent as part of a POST request it should be in the $_POST array.

But why guess? Why not just ask the people who developed AMS how they
do it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Closed Thread