Here’s a sample code to get XRP price. With cryptocoincharts API, you can get it easily.

<?php $f="http://www.cryptocoincharts.info/v2/api/listCoins"; $file=file_get_contents($f); if($file==""){ print("error:cant get file"); return; } $myjson = json_decode($file); foreach($myjson as $myline){ if($myline->id == "xrp”){ print $myline->name."=".$myline->price_btc."BTC"; } } ?>

It’s better to save api data as a local file. Don’t abuse API.