- file_get_contents: documentation ( source)
<script>
jQuery(document).ready(function() {
// BITONIC
var sellBitonic = jQuery.parseJSON('<?php echo @file_get_contents('https://bitonic.nl/api/sell'); ?>');
jQuery(".bitcoin .compare-sell-bitonic").html(parseFloat(sellBitonic.price).toFixed(2));
var buyBitonic = jQuery.parseJSON('<?php echo @file_get_contents('https://bitonic.nl/api/buy'); ?>');
jQuery(".bitcoin .compare-buy-bitonic").html(parseFloat(buyBitonic.price).toFixed(2));
// BITMYMONEY
var bitmymoney = jQuery.parseJSON('<?php echo @file_get_contents('https://www.bitmymoney.com/api/v1/ticker'); ?>');
jQuery(".bitcoin .compare-buy-bitmoney").html(parseFloat(bitmymoney.btc.ask).toFixed(2));
jQuery(".bitcoin .compare-sell-bitmoney").html(parseFloat(bitmymoney.btc.bid).toFixed(2));
// BITKASSA
var bitkassa = <?php echo @file_get_contents('https://www.bitkassa.nl/price?btc_amount=1'); ?>;
jQuery(".bitcoin .compare-buy-bitkassa").html(parseFloat(bitkassa.BTC_EUR.prices.buy).toFixed(2));
jQuery(".bitcoin .compare-sell-bitkassa").html(parseFloat(bitkassa.BTC_EUR.prices.sell).toFixed(2));
// ANYCOIN
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=BTC&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=BTC&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".bitcoin .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".bitcoin .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=LTC&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=LTC&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".litecoin .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".litecoin .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=ETH&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=ETH&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".ethereum .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".ethereum .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=XMR&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=XMR&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".monero .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".monero .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=STRAT&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=STRAT&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".stratis .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".stratis .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=NEO&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=NEO&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".neo .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".neo .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=ETC&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=ETC&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".etherclassic .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".etherclassic .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=PIVX&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=PIVX&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".pivx .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".pivx .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=NLG&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=NLG&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".gulden .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(3));
jQuery(".gulden .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(3));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=DOGE&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=DOGE&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".dogecoin .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(3));
jQuery(".dogecoin .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(3));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=DASH&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=DASH&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".dash .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".dash .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=BLK&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=BLK&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".blackcoin .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(3));
jQuery(".blackcoin .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(3));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=PPC&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=PPC&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".peercoin .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".peercoin .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
var buyAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/buyprices?CoinCode=ZEC&FiatCode=EUR&CoinAmount=1'); ?>;
var sellAnycoin = <?php echo @file_get_contents('https://anycoindirect.eu/api/public/sellprices?CoinCode=ZEC&FiatCode=EUR&CoinAmount=1'); ?>;
jQuery(".zcash .compare-buy-anycoin").html(parseFloat(buyAnycoin.Data[0].FiatAmount).toFixed(2));
jQuery(".zcash .compare-sell-anycoin").html(parseFloat(sellAnycoin.Data[0].FiatAmount).toFixed(2));
// SATOS
var satos = <?php echo @file_get_contents('https://api.satos.nl/v2/public/getTicker?amount=1'); ?>;
jQuery.each(satos, function(k,v) {
if (v.pairs === 'EUR/BTC') {
jQuery(".bitcoin .compare-buy-satos").html(parseFloat(satos[k].buy).toFixed(2));
jQuery(".bitcoin .compare-sell-satos").html(parseFloat(satos[k].sell).toFixed(2));
}
if (v.pairs === 'EUR/LTC') {
jQuery(".litecoin .compare-buy-satos").html(parseFloat(satos[k].buy).toFixed(2));
jQuery(".litecoin .compare-sell-satos").html(parseFloat(satos[k].sell).toFixed(2));
}
if (v.pairs === 'EUR/BCH') {
jQuery(".bitcoincash .compare-buy-satos").html(parseFloat(satos[k].buy).toFixed(2));
jQuery(".bitcoincash .compare-sell-satos").html(parseFloat(satos[k].sell).toFixed(2));
}
if (v.pairs === 'EUR/XRP') {
jQuery(".ripple .compare-buy-satos").html(parseFloat(satos[k].buy).toFixed(2));
jQuery(".ripple .compare-sell-satos").html(parseFloat(satos[k].sell).toFixed(2));
}
});
});
</script>