I'm learning PHP and trying to learn how to call a service .
I try to use the simplexml_load_file but it doesn't work (it always returns false -- code below). I did some research and found that allow_url_fopen in php.ini should be "on" but it doesn't solve the problem.
- Code: Select all
$xml = simplexml_load_file('http://finance.yahoo.com/rss/headline?s=lvs');
if ( $xml == false )
echo "something wrong when parsing xml.";
I do testing in my local windows Vista machine using XAMPP.
Thanks in advance for the help.