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III7ZZZZZMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMZZZZZ7IIIIIIIIIIIIIII$ZZZZZ$IIIIIIIIIIIIIII7ZZZZZMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMZZZZZ7IIIIIIIIIIIIIIIIIIIIIIIIIIIII7$ZZZZNMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMNZZZZZ7IIIIIIIIIIIIIIIIIIIIIIZZZZZDMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMNZZZZZIIIIIIIIIIIIIIIZZZZZDMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMDZZZZZIIIIIIIZZZZZ8MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM8ZZZZZZZZZOMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMOZ8MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM TO LEARN MORE ABOUT OUR APIs and FRAMEWORK, PLEASE READ OUR DOCUMENTATION - http://docs.blockstrap.com */ //error_reporting(-1); $base = dirname(__FILE__); include_once $base . '/_libs/php/cache.php'; BlockstrapCache::config('stats', array('engine' => 'BlockstrapFileEngine', 'key_prefix' => 'bc_stats', 'cache_duration' => 10, 'purge_probability' => 100, 'path' => '/media/temp/bc_cache')); BlockstrapCache::config('blocks', array('engine' => 'BlockstrapFileEngine', 'key_prefix' => 'bc_blocks', 'cache_duration' => 3600, 'purge_probability' => 100, 'path' => '/media/temp/bc_cache')); BlockstrapCache::config('shortterm', array('engine' => 'BlockstrapFileEngine', 'key_prefix' => 'bc_shortterm', 'cache_duration' => 60, 'purge_probability' => 100, 'path' => '/media/temp/bc_cache'));
public function address($base, $currency, $slug, $data = array()) { $id = $this->request($slug); // MAKE API CALL $options = array('debug' => false, 'method' => 'address/transactions', 'id' => $id, 'coin' => $currency, 'showtxn' => 1, 'showtxnio' => 1); $key = 'addresstxn_' . $currency . '_' . $id; $results = BlockstrapCache::read($key, 'shortterm'); if (False === $results) { $results = $this->get($options); BlockstrapCache::write($key, $results, 'shortterm'); } if (isset($results['status']) && $results['status'] == 'success') { $json_url = false; $address = $results['data']['address']; $address['extras'] = array(); if (isset($results['data']['_request'])) { $address['extras']['currency'] = $this->currency(strtolower($results['data']['_request']['chain']['code'])); $address['extras']['code'] = strtolower($results['data']['_request']['chain']['code']); $json_url = $this->option('url'); $json_url .= $results['data']['_request']['request_uri']; $address['extras']['json'] = $this->priv($options); } $data['header']['sub'] = array('h1' => 'Address ' . $address['address'], 'h2' => 'Hash 160 - ' . $address['address_hash160']); $data['objs'] = array(0 => array('req' => $results['data']['_request'], 'address' => $address)); foreach ($data['objs'][0]['address']['transactions'] as $tx_key => $tx) { $ago = $this->ago($tx['time']); $data['objs'][0]['this_chain'] = strtolower($results['data']['_request']['chain']['code']); $data['objs'][0]['address']['transactions'][$tx_key]['ago'] = $ago; } } return $data; }