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,680 points
926 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,710 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,680 points
763 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,696 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,542 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
1,414 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,680 points
499 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,743 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
889 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,600 points
1,197 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,710 points
503 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,710 points
535 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