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 chooses 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 ideas which could help me?
Apr 4 in Blockchain by Rahul
• 8,980 points
35 views

1 answer to this question.

0 votes

Please find below an example of converting a EUR to a USD

$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; }

Hopefully, this helps you get what you were looking for. 

answered Apr 6 by Soham
• 8,730 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 Mar 31 in Blockchain by Rahul
• 8,980 points
41 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 Apr 7 in Blockchain by Aditya
• 7,280 points
41 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
483 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
559 views
0 votes
1 answer

Currency Conversion using PHP

 An example of converting EUR to USD ...READ MORE

answered Mar 24 in Blockchain by Rahul
• 8,980 points
18 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
961 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
278 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,850 points
51 views
0 votes
1 answer

Get amount of Bitcoins at an address with PHP

While checking the Coinbase address balance, the ...READ MORE

answered Feb 28 in Blockchain by Soham
• 8,730 points
30 views
0 votes
1 answer

Crypto Currency ICO process

To answer your question, only for the ...READ MORE

answered Feb 28 in Blockchain by Soham
• 8,730 points
42 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