Skip to content

Instantly share code, notes, and snippets.

@coinables
Last active January 25, 2020 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coinables/627f9d463f416b0e61c6e204c1eaa05a to your computer and use it in GitHub Desktop.
Save coinables/627f9d463f416b0e61c6e204c1eaa05a to your computer and use it in GitHub Desktop.
Uber Simple
<?php
//replace with your BIP32 extended public key
$xpub = "xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz";
$url = "https://api.blockchair.com/bitcoin/dashboards/xpub/".$xpub;
$fgc = json_decode(file_get_contents($url), true);
$addrlen = count($fgc["context"]["checked"]);
$lessfifty = $addrlen - 50;
$context = $fgc["context"]["checked"][$lessfifty];
$expl = explode(": ",$context);
$next = $expl[1];
?>
<!DOCTYPE html>
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
</head>
<body>
<center>Please Donate<br>
<div id="qrcode">
<h2>PAY MISTRESS FLUX</h2>
<img src="https://chart.googleapis.com/chart?cht=qr&chs=250x250&chl=<?php echo $next;?>">
<br>
<h4>BTC ONLY - NO SHITCOINS</h4>
<p><?php echo $next;?></p>
</div>
</center>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment