Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    New York

    extract xml posted to php page from external site

    I am using an API that will automatically post to a PHP page on my server status updates. It will post the updates in XML.

    I am told that
    "Then you will make the php page to grab the status and GUID from the XML we will automatically POST to that URL. The xml will look like the example below:

    <created-at>2013-11-05 16:36:08 -0800</created-at>
    <signed-at>2013-11-05 16:46:08 -0800</signed-at>

    What I am unsure of is how would I using PHP grab the value of guid and the status value from the xml that gets posted to the page. I know this might be simple but I am unclear how to go about working with xml posted to a page on my server from an external API.

    Any suggested code snippets would be helpful
    just a programmer

  2. #2
    Join Date
    Feb 2002
    New York
    Thanks for the reply. I guess my main question is if someone says their api will POST a XML response to a page you specify how would that mean you need to grab the xml into a php page you are making?

    When I asked the API provider their response was
    "You will probably want to parse for the <status> and then grab the <guid> to make the document details GET request."

    However that still does not help me know am I doing something like
    $xml = $_GET['XML'];

    or am I just able to do
    $guid = $_POST['guid'];
    $status = $_POST['status'];

    The api provider has no php samples so not sure how I am suppose to "grab the responses get request" ??

    Thanks for any suggestions you may have.
    just a programmer

  3. #3
    If the "guid" is in xml, obviously you first must get the xml.
    Not know what api, but it should have some info to get the xml. Or to use cUrl in php to send data via post and receive the response.
    The key must be in that api.

  4. #4
    Just found solution for my problem. Thank mjfroggy.

Similar Threads

  1. Wordpress post on external php page
    By mjfroggy in forum Programming Discussion
    Replies: 2
    Last Post: 11-07-2013, 11:23 AM
  2. XML Page
    By princy88 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 08-26-2006, 11:18 PM
  3. AJAX: Weird problem. (PHP-XML-> JS) XML not parsed properly
    By monilchheda in forum Programming Discussion
    Replies: 5
    Last Post: 05-23-2006, 11:52 AM
  4. Displaying an external html page using php
    By brumptonm in forum Programming Discussion
    Replies: 0
    Last Post: 04-29-2005, 04:25 AM
  5. Need help with php/xml grabing info from xml sheet placing into php.
    By in forum Programming Discussion
    Replies: 8
    Last Post: 04-07-2005, 04:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts