$content=file_get_contents("https://btc-e.com/api/2/btc_usd/ticker");
$data=json_decode($content);
$contentLTCUSD=file_get_contents("https://btc-e.com/api/2/ltc_usd/ticker");
$dataLU=json_decode($contentLTCUSD);
$contentLTCBTC=file_get_contents("https://btc-e.com/api/2/ltc_btc/ticker");
$dataLB=json_decode($contentLTCBTC);
echo "Data fetched from system at the following system times:";
echo nl2br ("\n ");
Echo "BTC_USD: ";
echo $data->ticker->server_time;
echo nl2br ("\n ");
Echo "LTC_USD: ";
echo $dataLU->ticker->server_time;
echo nl2br ("\n ");
echo "LTC_BTC: ";
echo $dataLB->ticker->server_time;
echo nl2br ("\n ");
echo "CURRENT BTC_USD PRICE: ";
echo nl2br ("\n ");
Echo "last: $";
echo $data->ticker->last;
echo nl2br ("\n ");
Echo "buy: $";
echo $data->ticker->buy;
echo nl2br ("\n ");
Echo "sell: $";
echo $data->ticker->sell;
$tickerlast = $data->ticker->last;
$tickerbuy = $data->ticker->buy;
$tickersell = $data->ticker->sell;
echo nl2br ("\n ");
echo "CURRENT LTC_USD PRICE: ";
echo nl2br ("\n ");
Echo "last: $";
echo $dataLU->ticker->last;
echo nl2br ("\n ");
Echo "buy: $";
echo $dataLU->ticker->buy;
echo nl2br ("\n ");
Echo "sell: $";
echo $dataLU->ticker->sell;
$tickerlastLU = $dataLU->ticker->last;
$tickerbuyLU = $dataLU->ticker->buy;
$tickersellLU = $dataLU->ticker->sell;
echo nl2br ("\n ");
echo "CURRENT LTC_BTC PRICE: ";
echo nl2br ("\n ");
Echo "last: $";
echo $dataLB->ticker->last;
echo nl2br ("\n ");
Echo "buy: $";
echo $dataLB->ticker->buy;
echo nl2br ("\n ");
Echo "sell: $";
echo $dataLB->ticker->sell;
$tickerlastLB = $dataLB->ticker->last;
$tickerbuyLB = $dataLB->ticker->buy;
$tickersellLB = $dataLB->ticker->sell;
echo nl2br ("\n ");
?>
I designed it to automatically reload every 2min, what it will do is get btc USD data ltc USD data and btc ltc data and display last buy and sell prices for all three. Modify it all you want. If you need any help just let me know.
Like what you see? Feel free to donate BTC to 1JtxTAtnda5wcJJj78UkN2QwsUBEesmHAN
JVarhol