http://'.$_SERVER['HTTP_HOST'].'/?'.$urlhash.''; } elseif (!empty($_GET)) { $urlhash = key($_GET); $hashfolder = substr($urlhash, 0, 2); $hashfile = substr($urlhash, 2); $hashfolderpath = './db/'.$hashfolder; $hashfilepath = $hashfolderpath.'/'.$hashfile; $findfiles = glob($hashfilepath); if (!empty($findfiles)) { $fullfilepath = current($findfiles); header('Location:'.file_get_contents($fullfilepath)); return 0; } $content = 'No link match this identifier.'; } else { $content = '
'; } //actual page below ?>