<?php $file = 'data/alix_data.dat'; include 'logger.php'; include 'exchanges.php'; #error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); $btc_usd = get_btc_usd(); if (!$btc_usd) { writelog("all", "no_bitcoin_price", "unresolved"); exit; #no bitcoin price available, sorry. will not gather data (offline?) } query_exchanges(); sleep(300); include "write_data.php"; sleep(30); include "parse_json.php"; sleep(5); include "createcsv_volume.php";
$btc_usd = get_btc_usd(); $nbt_cny = get_nbt_cny($btc_usd); $nbt_eur = get_nbt_eur(); if (!$btc_usd) { writelog("all", "no_bitcoin_price", "unresolved"); exit; #no bitcoin price available, sorry. will not gather data (offline?) } if (!$nbt_cny) { writelog("all", "no_cny_price", "unresolved"); exit; #no cny price available, sorry. will not gather data (offline?) } if (!$nbt_eur) { writelog("all", "no_eur_price", "unresolved"); exit; #no eur price available, sorry. will not gather data (offline?) } #do the query $timestamp = time(); $query = query_exchanges($timestamp, $global_tolerance, $btc_usd, $nbt_cny, $nbt_eur); #write it file_put_contents($data_munched, $query, LOCK_EX); #create chart points include "../charts/createcsv_walls.php"; #unlock if we locked # flock($fp, LOCK_UN); #} #else { # writelog("all", "file_locked", "unresolved"); #}