Getting currency conversion data from Yahooapis now that iGoogle is gone

前端 未结 3 1660
孤街浪徒
孤街浪徒 2021-01-24 16:19

Up until yesterday I had a perfectly working budget organizer site/app working with iGoogle.

Through PHP, using the following little line

file_get_conten         


        
3条回答
  •  醉梦人生
    2021-01-24 16:54

    Still a very useful solution by QuestionerNo27. Since early 2015, however, Yahoo YQL apparently slightly changed the XML output of their api. 'Name' now no longer translates into a string like 'USD to EUR', but to 'USD/EUR' and should in the code above be referenced this way:

    $toeur = array( 
         'usd' => $exchange['USD/EUR']
    

    instead of

    $toeur = array( 
         'usd' => $exchange['USD to EUR']
    

    and in a similar fashion for other currency conversions.

提交回复
热议问题