MySQL Forums
Forum List  »  PHP

processing http xml return in php
Posted by: Angela Smith
Date: October 02, 2013 10:02AM

I am a newbie in PHP. I am making a call to an http api using wget (the hosting site doesn't offer http_get). The call returns an xml set when do it manually. But it appears that my wget call is putting the response into an array.
I am unable to access the array and not sure where to go from here.
Below is my code. FYI -- The first 4 elements of the xml play_by_play object are: id, visitor, home, status.

exec('wget';, $array);

echo $array["play_by_play"][0]->id;


I have tried another approach and have confirmed that I am getting a response (count = 1). That is below. But I can't get to the content.

$myResult=exec('wget';, $array);

print count($myResult);
print $myResult;
if (count($myResult) > 0)
for ($i=0;$i<count($myResult);$i++) {
echo $arrElem;



Options: ReplyQuote

Written By
processing http xml return in php
October 02, 2013 10:02AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.