User avatar
nandibear
Global Moderator
Global Moderator
Posts: 2612
Joined: Sat Jan 30, 2016 7:04 am

Donate BTC of your choice to 1DYss8ztWEgcM93SJtnpfYVt6fp7cwmjBk

Contact: Website Twitter Telegram

PHP - Bitcoin total number of all time transactions on blockchain

Fri Feb 05, 2016 7:16 am

I wrote this php to display just the total number of all time Bitcoin transactions on the blockhain.

Does anyone here know of a more efficient way of doing this with php?

Thanks!

Code: Select all

<?php $info2= "https://blockchain.info/charts/n-transactions-total?format=json"; $data2 = json_decode(file_get_contents($info2), true); echo serialize($data2['values'][365]['y']); ?>
Image

User avatar
nandibear
Global Moderator
Global Moderator
Posts: 2612
Joined: Sat Jan 30, 2016 7:04 am

Donate BTC of your choice to 1DYss8ztWEgcM93SJtnpfYVt6fp7cwmjBk

Contact: Website Twitter Telegram

Re: PHP - Bitcoin total number of all time transactions on blockchain

Fri Feb 05, 2016 11:13 pm

Wrote this code now and it appears to be much more efficient:

Code: Select all

<?php $info2= "https://blockchain.info/charts/n-transactions-total?format=json"; $date2 = '{"values":"values","365":"365","y":"y"}'; $data2 = json_decode(file_get_contents($info2), true); echo $data2['values'][365]['y']; ?>
Image

Return to “Project Development”

Who is online

Users browsing this forum: No registered users and 3 guests