Assigning an XML object to a variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm sending a request to a remote web page using PHP's cURL in order to get
a response back in XML.  I've done this before and usually assign the
response to a variable (eg. $result) before using Sablatron to transorm the
XML.  Here is the code I've been using:
<?php
$varsent = 'a='.$a.'&b='.$b.'&c='.$c.'&d='.$d;

$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"http://www.mysite.com/xml.asp";);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $varsent);
$result=curl_exec($ch);
curl_close($ch);
?>
My next step is usually to XSLT the response held in $result.  The problem
with that is that $result is holding the value '1', which I'm assuming is
simply the boolean 'true'.  To see the XML response I have to
right-click/view source on the browser page.  Can anyone point me in the
right direction to find out how to put this 'embedded' XML into a string or
something else that I can transform?  Thanks for reading.
Brian

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux