diff --git a/backend.php b/backend.php
index 398015e..f49aa22 100644
--- a/backend.php
+++ b/backend.php
@@ -47,7 +47,7 @@
break;
case 'img':
- if ($_SERVER['REQUEST_METHOD'] !== 'GET' || empty($_GET['html'])) {
+ if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
exit;
}
@@ -81,7 +81,39 @@
echo '';
break;
-
+ case 'nft':
+ if ($_SERVER['REQUEST_METHOD'] !== 'GET' || empty($_GET['html'])) {
+ exit;
+ }
+ // get something randomish
+ $nft_generation_seed = "000000000000" . rand();
+ // make it look even more random
+
+ // implement a blokeChain - with really secure hashing, cuz other ones take too long
+ $blokeChain = function($seed) {
+ return hash('sha1',$seed);
+ };
+
+ $almost_an_nft = $blokeChain($nft_generation_seed);
+
+ // run it through the blokeChain until it his critical mass.
+ // this could take a while - so we are going to pretend that we are trying a lot to fix it.
+ $we_tried = 0;
+ while(strpos($almost_an_nft,"69") !== 0 && $we_tried !== 69) {
+ $almost_an_nft = $blokeChain($nft_generation_seed);
+ $we_tried++;
+ }
+
+ $actualy_an_nft = ($we_tried === 69) ? "69" . substr($almost_an_nft,2) :$almost_an_nft;
+
+ echo "
{$actualy_an_nft}
"; + // do some hacker stuff + + unset($nft_generation_seed); + unset($actualy_an_nft); + unset($almost_an_nft); + + break; default: exit('no valid endpoint specified'); break;