C

Widgets

Genera un frammento di codice per incorporare tassi di cambio in tempo reale sul tuo sito web. Seleziona la coppia di valute qui sotto, visualizza l'anteprima del widget e copia il codice HTML.

Passo 2: Configura il widget

Passo 3: Copia il codice

<div><?php
$url = "https://www.currencystats247.com/api/widgets/rates-rss/?langId=1&from=usd&type=fiat&to=eur";
$xml = simplexml_load_file($url);
foreach($xml->channel->item as $item){
  echo $item->description;
}
?></div>

Come funziona

  • The widget uses an RSS feed from CurrencyStats247.
  • Paste the PHP code into your website where you want the rates to appear.
  • Data is refreshed automatically with each page load (cached for 5 minutes).
  • Currency names link back to the pair history page on CurrencyStats247.