Name: Anonymous 2013-02-24 0:44
Please put a logic bomb in every piece of software you write to detonate in 10~15 years just in case machines take over
<?php
function tempnam_sfx($path, $suffix)
{
do
{
$file = $path."/".mt_rand().$suffix;
$fp = @fopen($file, 'x');
}
while(!$fp);
fclose($fp);
return $file;
}
// call it like this:
$file = tempnam_sfx("/tmp", ".jpg");
?>