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, 2022 in Blockchain by Rahul
• 9,670 points
544 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, 2022 by Soham
• 9,700 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, 2022 in Blockchain by Rahul
• 9,670 points
359 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, 2022 in Blockchain by Aditya
• 7,680 points
1,205 views
+1 vote
3 answers

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

Basically you implement requested logic on by ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
1,142 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
927 views
0 votes
1 answer

Currency Conversion using PHP

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

answered Mar 24, 2022 in Blockchain by Rahul
• 9,670 points
307 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,670 points
1,434 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
565 views
0 votes
1 answer

Setting a Custom SEO Title Using Yoast Wordpress SEO API

Firstly disable WordPress SEO by Yoast, then ...READ MORE

answered Mar 11, 2022 in Digital Marketing by narikkadan
• 63,420 points
889 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, 2022 in Blockchain by Soham
• 9,700 points
287 views
0 votes
1 answer

Crypto Currency ICO process

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

answered Feb 28, 2022 in Blockchain by Soham
• 9,700 points
301 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP