ok below is my code, to call an external xml file and return some information in xml format, now this works perfectly if i manually add the value to the end of the url string, however as soon as i replace the value with the variable $reg it doesn’t return any results.
$reg = $_POST['reg'];
$file = 'http://testsite.mywebsite.co.uk/app.xml?apikey=*******************&vid=TEST&vrm=$reg';
if(!$xml = simplexml_load_file($file))
exit('Failed to open '.$file);
print_r($xml);
Any suggestions would be appreciated, as i can not see why it wouldn’t work, i have even tried wrapping it in quotes, but still nothing.
Thanks
1 Answer