Bitcoin Forum
November 06, 2024, 06:23:23 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 »  All
  Print  
Author Topic: PHP Bitcoin Node Status Page  (Read 10021 times)
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
March 23, 2015, 10:15:51 AM
 #41

hi craig,

I noticed this site, some 1/2 a year or so ago and relocated it after seeing your topic here;

http://176.10.116.242/xbt_cgi/node_status.pl?sortfield=syncnode&sortdirection=1

this is something (the stats from bitcoind) that you could easily incorporate into what you have already, I'd think..

All done - see my node at https://loki.vikingserv.net Smiley

Code is also updated on GitHub Smiley
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
March 23, 2015, 01:49:16 PM
 #42

Apologies for the double-post, but I've also added a little Monday present - geolocation-based flags for both the node and peer IP addresses Smiley

Demo: https://loki.vikingserv.net
Mitchell
Staff
Legendary
*
Offline Offline

Activity: 4102
Merit: 2301


Verified awesomeness ✔


View Profile WWW
March 23, 2015, 01:50:54 PM
 #43

Apologies for the double-post, but I've also added a little Monday present - geolocation-based flags for both the node and peer IP addresses Smiley

Demo: https://loki.vikingserv.net
Nice! I already added something like that to my node, but it isn't as sophisticated, haha. Will update my node in a bit.

EDIT: Done. However, it seems that "Time Connected", "Last Send" and "Last Receive" doesn't work.
EDIT2: Your config.sample.php does not contain the "geolocate_peer_ip" option.

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
March 23, 2015, 02:22:39 PM
 #44

Nice! I already added something like that to my node, but it isn't as sophisticated, haha. Will update my node in a bit.

EDIT: Done. However, it seems that "Time Connected", "Last Send" and "Last Receive" doesn't work.
EDIT2: Your config.sample.php does not contain the "geolocate_peer_ip" option.

Re: EDIT1: You may need to refresh your cache. The data comes from the getinfo() RPC call, so I'd suggest turning on debug mode and checking the output inside the HTML comment.
Re: EDIT2 - Strange, It's in the version on GitHub here: https://github.com/craigwatson/bitcoind-status/blob/master/php/config.sample.php#L31
Mitchell
Staff
Legendary
*
Offline Offline

Activity: 4102
Merit: 2301


Verified awesomeness ✔


View Profile WWW
March 23, 2015, 04:25:31 PM
 #45

1. I've cleared my cache multiple times, but that didn't the problem. What is the version of your bitcoind?
2. And I guess I fucked up the pull than, my bad!

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
Mitchell
Staff
Legendary
*
Offline Offline

Activity: 4102
Merit: 2301


Verified awesomeness ✔


View Profile WWW
April 01, 2015, 07:54:30 AM
 #46

Well, I just pulled again, removed everything but my config, redid my config and now it works. I guess I fucked it up somewhere along the line. Tongue

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
August 14, 2015, 11:23:19 PM
 #47

Just a quick bump - since my last update there's been a couple of minor improvements to the status page.

It can now report the bitcoin daemon uptime (though only on Linux systems), and you can also toggle displaying the node's IP off altogether.

As always, tips/comments/pull requests are appreciated Smiley
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
December 01, 2015, 08:48:48 AM
 #48

Hi Craig,
Thanks for putting this together. Could you explain the few steps after it's downloaded from Github, where do I put the folder (or contents)?

Typically, you'll need to put the folder in /var/www on your server - this is normally where Apache serves content from. That said, you'll need to check the Apache configuration as it can vary from system to system.

You can also change Apache's configuration to serve content from a totally different directory (e.g. /srv/www) as long as the filesystem permissions allow Apache read access.

Apache will also need write access to wherever you configure it to place the cache files - I've set the default to be /tmp but this is cleared after every reboot, so it may not be appropriate in all cases.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1540


No I dont escrow anymore.


View Profile
December 01, 2015, 09:28:22 AM
 #49

Did this break your live demo?

Code:
Warning: require_once(./php/config.php): failed to open stream: No such file or directory in /srv/www/bitcoind-status/index.php on line 12

Fatal error: require_once(): Failed opening required './php/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/www/bitcoind-status/index.php on line 12

Im not really here, its just your imagination.
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
December 01, 2015, 06:30:44 PM
 #50

Did this break your live demo?

Code:
Warning: require_once(./php/config.php): failed to open stream: No such file or directory in /srv/www/bitcoind-status/index.php on line 12

Fatal error: require_once(): Failed opening required './php/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/www/bitcoind-status/index.php on line 12

Apologies - I reinstalled my servers a while back. The whole server is Puppetised and the status page config isn't (or at least wasn't) so it got missed - good spot!

I've temporarily stopped bitcoind on the boxes as it was making them quite swappy.

I've also added a slightly nicer error message when the config file isn't found, so it doesn't fall through to the PHP error.
^.^
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
December 02, 2015, 12:04:52 AM
 #51

Be nice if I could run a version on windows Cheesy
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
December 02, 2015, 10:22:28 AM
 #52

Be nice if I could run a version on windows Cheesy

You should be able to run this on Windows - as long as you have PHP with the curl extension installed, plus a compatible webserver such as Apache.

The communication with bitcoind is done via RPC so there's no underlying Linux system calls done for the core functionality. The only OS-level Linux commands run are to get various system stats like disk usage, daemon uptime etc.
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
January 07, 2016, 05:22:24 PM
 #53

OK, apologies for the double-post and bump, but in the interest of keeping the thread updated, I have made the following minor changes to the status page (thanks to Audun Larsen for the pull requests!):

  • Peer Geolocation: Country flag now displays the full country name on mouseover
  • Peer List: You can now ignore/filter the peer list by IP (in addition to the existing feature to ignore all Tor peers)
  • Peer List: Peers now have an inbound/outbound connection identifier
  • Peer List: Peer connected time and last send/receive are now relative times (i.e. "x minutes", rather than absolute timestamps
  • Bitnodes API: Corrected the Bitnodes API URL (removing the getaddr part which is no longer used)
  • Settings: You can now hard-code the PHP timezone if you don't have it set in php.ini
Mitchell
Staff
Legendary
*
Offline Offline

Activity: 4102
Merit: 2301


Verified awesomeness ✔


View Profile WWW
January 07, 2016, 06:13:30 PM
 #54

No need to apologize, as you are allowed to bump your own thread, as long as there is 24 hours between your previous post and the new one. Wink

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
calkob
Hero Member
*****
Offline Offline

Activity: 1106
Merit: 521


View Profile
January 08, 2016, 04:52:25 PM
 #55

Very good, wish i had the skills to do that....... well done sir  Wink

Thats a great idea for a website, A site where nodes could register and receive donations from bitcoin users.  or a node pool where donations are spread among nodes depending on uptime.... maybe that already exists ?
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
January 12, 2016, 10:47:30 AM
 #56

Very good, wish i had the skills to do that....... well done sir  Wink

Thats a great idea for a website, A site where nodes could register and receive donations from bitcoin users.  or a node pool where donations are spread among nodes depending on uptime.... maybe that already exists ?

Thanks Smiley

There already is a site where users can register Bitcoin addresses alongside their nodes - bitnodes.21.co.

It's not really exposed (you have to drill into the node details to see the address) but the data is there Smiley

My nodes:

https://bitnodes.21.co/nodes/188.65.59.69-8333/
https://bitnodes.21.co/nodes/185.122.56.197-8333/
https://bitnodes.21.co/nodes/31.220.7.136-8333/
duel007
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 17, 2016, 04:37:16 PM
 #57

This thing works great once I got everything worked out with the settings!

Thanks for creating and maintaining it.
Canoeboy
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 18, 2016, 03:19:08 PM
 #58

Is this good for php 7.x (I'm running 7.0.11) ?
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
September 18, 2016, 03:57:27 PM
 #59

Is this good for php 7.x (I'm running 7.0.11) ?

This does indeed work with PHP7, my test node is running 7.0.10 Smiley
CraigWatson (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
January 14, 2017, 08:43:50 AM
 #60

Thread bump and feature update, you can now configure extra node types to graph via an array in the config file  Grin

See my node for an example (I've added breadwallet and bither clients to the default Core/Classic/BitcoinJ set).
Pages: « 1 2 [3] 4 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!