Realtime Currency Converter using PHP & JQuery

If you are working on an application related to finance domain or on a shopping cart application which is providing service internationally,
you might need a functionality which basically converts forex rates or currency. Hence, by keeping this scenario, today we will build a small script
which will convert currency realtime.

Offcourse there are lot of vendors providing APIs for this, but we will integrate google finance converter.

In PHP script we will have a function which will take three parameters say amount, from(currency) and to (currency) and will push these to google finance url
as query string and read the output. Code for convert.php , say, will look like:

Now, lets build the UI for this:

JQuery code will be :

Complete HTML code will look like:

Try this yourself. Check DEMO

Leave a Reply

Your email address will not be published. Required fields are marked *