How can I extract data of an external XML to PHP? -


i have external xml of forex, in url: http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote

and want extract info of it.

i have code in php:

$abc = simplexml_load_file('http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote'); $abc->query->results->rate[0]->name; 

and throws this:

notice: trying property of non-object in /var/www/html/prueba.php on line 3

how can extract data of it, , how can i, example, extract data of usd/eur using filter of words? thanks


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -