I need some help!
I have an application I'm writing that needs to retrieve an XML response from a server. I tried to use simplexml_load_file, but it doesn't seem to like loading the external file. Here is a code sample for a page that my form posts to:
$user = $_POST['UserId'];
$pass= $_POST['Password'];
$sess = $_POST['SessId'];
$rv = $_POST['RS'];
$rs = $_POST['RV'];
$xmlUrl = "https://somesite.com/app?UserId=$user&Password=$pass&SessId=$sess&RS=$rs&RV=$rv";
$results = simplexml_file_load($xmlUrl);
echo $results;
Here is the error I get:
Warning: warning: filed to load external entity "https://somesite.com/app?UserId=me&Password=blah&SessId=New:mysite&RS=100&RV=50" in C:\path\to\myfile.php on line 11
Can you load external files with simplexml? Is there a better way to retrieve an xml response? Is it possibly because of the https?
I'd appreciate any help? Thanks!
Eddy