Here is the .php script:
It outputs this as $response:PHP Code:$ch = curl_init();
$headers2 = array(
'HTTP/1.0 GET',
'Accept: application/xml',
'Content-Type: application/xml'
);
curl_setopt($ch, CURLOPT_URL, "https://app.streamsend.com/audiences/1/people.xml?email_address=test@email.com");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers2);
curl_setopt($ch, CURLOPT_USERPWD, "9a8nvy39wu:9678h4vt59a87");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo "$response";
Now my question is I want the contents of <id></id> to be a variable in the script to move on to the next thing it needs to do. So in other words I want the results to be I guess changed into individual variables? so that lets say it is able to make $id=3 based on the above example. Is this possible? Thanks for any help as it is greatly appreciated!Code:<people> <person> <created-at>2009-02-20T15:40:15Z</created-at> <email-address>test@email.com</email-address> <email-content-format>html</email-content-format> <id>3</id> <ip-address>69.52.437.133</ip-address> <opt-status>active</opt-status> <soft-bounce-count>0</soft-bounce-count> <subscribed-at>2009-02-20T15:40:46Z</subscribed-at> <tracking-hash encoding="base64">Skt5eTZOSQ== </tracking-hash> <updated-at>2009-02-20T18:24:14Z</updated-at> <user-agent>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.48 Safari/525.19</user-agent> <audience-id>1</audience-id> </person> </people>![]()


Reply With Quote
Bookmarks