Last active
January 13, 2018 19:59
-
-
Save robertuniqid/29f4e7bce8e6c66521e4334df8a6e2fa to your computer and use it in GitHub Desktop.
PHP - Detect your CounterParty Wallet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //$information = file_get_contents( 'information.txt' ); | |
| // or | |
| $information = " | |
| public-key-address | |
| public-key-address | |
| public-key-address | |
| public-key-address | |
| "; | |
| // Do not edit from here. | |
| $information = explode( "\n", trim( $information ) ); | |
| foreach( $information as $wallet ) { | |
| $wallet = trim( $wallet ); | |
| $data = json_decode( file_get_contents( 'https://xchain.io/api/address/' . $wallet ) ); | |
| if( intval( $data->estimated_value->usd ) < 1 ) | |
| continue; | |
| echo $wallet; | |
| echo "\n"; | |
| foreach( $data->estimated_value as $pair => $value ) | |
| echo ' | ' . $pair . ' ' . $value; | |
| echo "\n"; | |
| } | |
| exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment