2

I want to convert currencies using google finance api. But its not working in my local machine(India). It works fine when I hit from one server located in USA and provides proper result.

Url : https://finance.google.com/finance/converter?a=1&from=ZAR&to=USD&meta=53336452-3e60-4fa1-9740-9ef8ea9e9118

Can anyone please help me to work this api properly in my local machine?

Any help will be appriciated Thanks.

maulik sakhare
  • 1,957
  • 1
  • 12
  • 19
  • The above url will redirect user to search page as it returns with status 302, and next page to redirect information (this url is google search url in this case). – maulik sakhare Mar 26 '18 at 06:26
  • alternative service: https://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance/21518807 – WonderLand May 02 '18 at 15:38

1 Answers1

5

I was facing the similar issue (Google Converter API suddenly not working)

As per my finding, I got the solution and conclude here that Google recently update the finance API. The below link is work for me

Latest URL: https://finance.google.com/bctzjpnsun/converter

file_get_contents("https://finance.google.com/bctzjpnsun/converter?a=$amount&from=$from_Currency&to=$to_Currency");
Ravee Sunshine
  • 386
  • 1
  • 5
  • 15