Sample of using currency exchange rate web service, see more explanations on Developpers page, source code in PHP is available here

Click here to see our price or to subscribe

1); $leservice=new SoapClient($wsdl, $option); $mylist=$leservice->DescCurrency("EN", "JPY"); echo "Label of country for currency JPY is ".$mylist->CountryDescription .", currency label is ". $mylist->CurrencyLabel."

"; $mylist=$leservice->DescCurrency("FR", "FRF"); echo "French label of country using FRF is \"".$mylist->CountryDescription ."\", currency name is \"". $mylist->CurrencyLabel."\"

"; $mylist=$leservice->DescCurrency("DE", "ATS"); echo "Im Deutsch, Währung ATS ist ".$mylist->CountryDescription ."

"; $mylist=$leservice->DescCurrency("PT", "FRF"); echo "FRF currency in portuguese is ".$mylist->CountryDescription ."

"; $mylist=$leservice->DescCurrency("JP", "GBP"); echo "Label for GBP in japanese is \"".$mylist->CountryDescription ."\"

"; $mylist=$leservice->Convert("123.45", "EUR", "USD", "15/12/2011", "",""); echo "Converting 123.45 EUR in USD on 15/12/2011 - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; $mylist=$leservice->Convert("123.45", "EUR", "GBP", "", "",""); echo "Converting 123.45 EUR in GBP on today's date no password provided (should use year 1999 because no credentials) - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; $mylist=$leservice->Convert("123.45", "EUR", "GBP", "", "YOURLOGIN", "ASK FOR YOUR PASSWORD AT WEBMASTER@FXTOP.COM"); echo "Converting 123.45 EUR in GBP on today's date with login/password provided - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; $mylist=$leservice->Convert("123.45", "USD", "GBP", "15/12/1953", "YOURLOGIN", "ASK FOR YOUR PASSWORD AT WEBMASTER@FXTOP.COM"); echo "Converting 123.45 USD in GBP on 15/12/1953 with login/password provided - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; echo "calling ListCurrencies()
"; $mylist=$leservice->ListCurrencies("",""); var_dump($mylist); //echo "calling to ListCurrencies() returned : $mylist->IsocodeList
"; $lArray=explode("/",$mylist); print "Retrieve individual currency labels in German for first 5 rows :

"; $li=1; foreach($lArray as $lCurrency) { $v=$leservice->DescCurrency("DE", $lCurrency); print ""; $li=$li+1; if ($li>5) { break; } } print "
NumberIsocodeCountryLabelNb DecMode C
" . ($li) . "" . $v->Isocode . "" . $v->CountryDescription . "" . $v->CurrencyLabel . "" . $v->NbDec . "" . $v->ModeC . "
"; print "

Trying to call an unknown function and debugging it
"; try { $leservice->ThisFunctionDoesNotExist(); } catch(SoapFault $fault) { //

tag displays xml output in html echo 'Request : <br/><xmp>', $leservice->__getLastRequest(), '

Error Message :
', $fault->getMessage(); } ?>