Currency Conversion using PHP

0 votes
I'm looking for a way to convert any amount from one currency to another on a website. The user would enter something like '100' and select USD as the currency, and then choose Australian or Canadian dollars as the currency to convert to. When he clicks the 'Convert' button, I'd like to convert that amount automatically, through some API, and show him the amount in the currency he chose to convert to.  Any help will be appreciated.
Mar 11 in Blockchain by Soham
• 8,730 points
18 views

1 answer to this question.

0 votes

 An example of converting EUR to USD has been mentioned below:-

$url = 'http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=EUR&ToCurrency=USD'; $xml = simpleXML_load_file($url,"SimpleXMLElement",LIBXML_NOCDATA); if($xml === FALSE) { //deal with error } else { $rate = $xml; }

answered Mar 24 by Rahul
• 8,980 points

Related Questions In Blockchain

0 votes
1 answer

bitcoin to currency converter and it's reverse in php

Ok, you can get the value by ...READ MORE

answered Apr 7 in Blockchain by Aditya
• 7,280 points
34 views
+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Consider following tutorial from Hyperledger Fabric "Getting Started" pages. Basically ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
481 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
555 views
+1 vote
1 answer

Transaction using Blockchain wallet APi

Each transaction requires a fee to be ...READ MORE

answered Jun 19, 2018 in Blockchain by Perry
• 17,100 points
255 views
0 votes
1 answer

Currency Conversion using PHP

Please find below an example of converting ...READ MORE

answered Apr 6 in Blockchain by Soham
• 8,730 points
34 views
0 votes
1 answer

Trying to call AWS API via PHP

Try using AWS SDK for PHP, Link ...READ MORE

answered Jun 6, 2018 in AWS by Cloud gunner
• 4,650 points
960 views
0 votes
1 answer

How to use Blockchain receive API without exchange rate?

Your code contains the amount in USD ...READ MORE

answered Aug 21, 2018 in Blockchain by Perry
• 17,100 points
276 views
0 votes
0 answers

Setting a Custom SEO Title Using Yoast Wordpress SEO API

I've just installed this plugin on my ...READ MORE

Mar 10 in Digital Marketing by Kichu
• 16,050 points
50 views
0 votes
1 answer

bitcoin to currency converter and it's reverse in php

Ok, you can get the value by ...READ MORE

answered Mar 31 in Blockchain by Rahul
• 8,980 points
38 views
0 votes
1 answer

How to set fee in raw bitcoin transaction using btcutil

To answer your question, the settxfee is ...READ MORE

answered Mar 24 in Blockchain by Rahul
• 8,980 points
26 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP