Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Loris.php

From John's Wiki
Revision as of 04:00, 14 December 2023 by Admin (talk | contribs) (Created page with "Useful little PHP script for holding a connection open for testing. <pre> <?php // John testing holding a connection open, will clean up. Although I guess if // you're reading this that was a lie, sorry... →‎Debug: ini_set('display_errors','1'); ini_set('display_startup_errors','1'); error_reporting (E_ALL); echo "Randomness Begin..."; function random_string($length) { $str = random_bytes($length); $str = base64_encode($str); $str = str_replace(["+", "/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Useful little PHP script for holding a connection open for testing.

<?php
// John testing holding a connection open, will clean up. Although I guess if
// you're reading this that was a lie, sorry...
/* Debug
*/
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
error_reporting (E_ALL);

echo "Randomness Begin...";

function random_string($length) {
    $str = random_bytes($length);
    $str = base64_encode($str);
    $str = str_replace(["+", "/", "="], "", $str);
    $str = substr($str, 0, $length);
    return $str;
}

while (True) {
    echo random_string(32) ."\n<br>\n";
}
?>