Created
March 6, 2018 22:08
-
-
Save svenpohl/325ebad3ec400ac25bec8381ddb7558d to your computer and use it in GitHub Desktop.
CLO snapshot checker
This file contains 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 | |
/* | |
index.php - simple CLO checker script - sven.pohl@zen-systems.de | |
*/ | |
?> | |
Check CLO-snapshot!<br><br> | |
<form action='index.php' method='post'> | |
ETC-account: <input type='text' id='etc_address' name='etc_address' style='width:400px;' value=''><br> | |
<input type='submit' value='Check''> | |
</form> | |
<?php | |
if ( isset($_REQUEST['etc_address']) ) | |
{ | |
$etc_address = strtolower( trim($_REQUEST['etc_address']) ); | |
$fp = fopen("snapshot_0001.txt", 'r'); | |
$linecounter = 0; | |
$FOUND = false; | |
while ( !feof($fp) ) | |
{ | |
$line = fgets($fp,100); | |
$line_array = explode(",", $line); | |
$linecounter++; | |
if ( $line_array[1] == $etc_address ) | |
{ | |
$FOUND = true; | |
print("Your Balance (CLO) will be:<br>"); | |
print("Line ".$linecounter.": (".$line_array[1].") Balance: ".$line_array[2]." Wei, (". ($line_array[2]*1.0) / ( 1000000000000000000) ." ETH)<br>"); | |
} // if | |
} // while (!feof($fp)) | |
if ($FOUND == false) print("Not found! ;(<br>"); | |
print("<br><hr>Addresses: $linecounter"); | |
} // if ( isset($_REQUEST['etcaddress']) ) | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment