Can someone convert this function from php to jquery? Im not sure a file_get_contents equivalent exists.
(this php function just grabs the balance of a given bitcoin address, in this case the balances are zero for all four so it should return 0 0 0 0)
<?php
function getBalance($adress) {
return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $adress);
}
$addy1_balance = getBalance('19F16Tg47PUsie2vNzkjJn5xsgjAPU3z2f') / 100000000;
$addy2_balance = getBalance('17jJBRxVdNX4uP2gjs5t9LEMJ56zAXK7iC') / 100000000;
$addy3_balance = getBalance('13FBnfCFvJmketncTwr2csXJrzwU4wPLqe') / 100000000;
$addy4_balance = getBalance('17tGnUhPNTF1L2NpfmmKWLFQS5teRGJSaf') / 100000000;
?>
echo $addy1_balance;
echo $addy2_balance;
echo $addy3_balance;
echo $addy4_balance;