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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jl

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

    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_conten ts. :

    $contents = file_get_conten ts($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

    #2
    Re: Getting the HTTP response code that is sent via a cell phone

    *** jl escribió/wrote (8 Sep 2006 04:30:04 -0700):
    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:



    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
    --

    Comment

    • Jerry Stuckle

      #3
      Re: Getting the HTTP response code that is sent via a cell phone

      jl wrote:
      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_conten ts. :
      >
      $contents = file_get_conten ts($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@attgl obal.net
      =============== ===

      Comment

      Working...