More actions
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(["+", "/..." |
No edit summary |
||
Line 1: | Line 1: | ||
Useful little PHP script for holding a connection open for testing. | Useful little PHP script for holding a connection open for testing. | ||
< | <syntaxhighlight lang="php" line> | ||
<?php | <?php | ||
// John testing holding a connection open, will clean up. Although I guess if | // John testing holding a connection open, will clean up. Although I guess if | ||
Line 25: | Line 25: | ||
} | } | ||
?> | ?> | ||
</ | </syntaxhighlight> |
Latest revision as of 21:35, 28 November 2024
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";
}
?>