catching xml response

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
TheHughMan
Forum Newbie
Posts: 1
Joined: Wed Sep 10, 2008 2:22 am

catching xml response

Post by TheHughMan »

i'm very new to using xml, especially with php, so please bare with me.
i need to submit some xml code to a server which i have no control over.
the method for submitting it is through a query string, for example:
http://www.whatever.com/whatever.js?command=<xml code goes here>

when i do this, it sends an xml packet in response.
how would i tell my script to 'redirect' to the above url, but then to catch the xml returned so that i can carry on processing the returned xml packet within the same script?
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: catching xml response

Post by jaoudestudios »

Use php function file

i.e

Code: Select all

 
$results = file("QUERY_STRING");
 
Post Reply