<commit_before><?php
require_once __DIR__ . "/../db.php";
require_once __DIR__ . "/../core/internal/urlhash.php";


// Parse the URL //


// Validate/Convert to an ID //


// Check if cached (APCu), and emit stored redirect URL if it is (END) //


// Do database lookup for Item ID, cache (APCu) and emit redirect URL (END) //

//apcu_store(); // Cache value for 5 minutes //


// If no ID is present //
echo "<strong>ldj.am</strong> - Ludum Dare URL shortener.";

echo "<br />\n";
echo "<br />\n";

echo "Int: " . PHP_INT_MAX;

echo "<br />\n";
echo "<br />\n";

$rando = mt_rand();
echo "Rando: " . $rando . "     (" . urlhash_encode($rando) . ") => (" . urlhash_decode(urlhash_encode($rando)) .")<br />\n";

echo "<br />\n";
echo "<br />\n";

echo '$_GET:<br /><pre>';
print_r( $_GET );
echo '</pre>';

echo "<br />\n";
echo "<br />\n";

echo '$_SERVER:<br /><pre>';
print_r( $_SERVER );
echo '</pre>';

// If ID is bad //

?><commit_msg>removed excess logging<commit_after><?php
require_once __DIR__ . "/../db.php";
require_once __DIR__ . "/../core/internal/urlhash.php";


// Parse the URL //


// Validate/Convert to an ID //


// Check if cached (APCu), and emit stored redirect URL if it is (END) //


// Do database lookup for Item ID, cache (APCu) and emit redirect URL (END) //

//apcu_store(); // Cache value for 5 minutes //


// If no ID is present //
echo "<strong>ldj.am</strong> - Ludum Dare URL shortener.";

echo "<br />\n";
echo "<br />\n";

echo "Int: " . PHP_INT_MAX;

echo "<br />\n";
echo "<br />\n";

$rando = mt_rand();
echo "Rando: " . $rando . "     (" . urlhash_encode($rando) . ") => (" . urlhash_decode(urlhash_encode($rando)) .")<br />\n";

echo "<br />\n";
echo "<br />\n";
/*
echo '$_GET:<br /><pre>';
print_r( $_GET );
echo '</pre>';

echo "<br />\n";
echo "<br />\n";

echo '$_SERVER:<br /><pre>';
print_r( $_SERVER );
echo '</pre>';
*/
// If ID is bad //

?>
{'fraction_non_alphanumeric': 0.23746701846965698, 'fraction_numerical': 0.0010554089709762533, 'mean_word_length': 2.7995991983967934, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2937354', 'n_tokens_mistral': 729, 'n_tokens_neox': 711, 'n_words': 224}