{$_SERVER['HTTP_REFERER']} cannot be found"; exit(); } // main() ******************************** $hompa['coodir']="../../private/"; # get_home_paths(); $my_cnf=parse_ini_file("{$hompa['coodir']}my.cnf"); if (!isset($_SERVER['HTTP_REFERER'])) { header("HTTP/1.1 400 Bad request"); echo "\$_SERVER['HTTP_REFERER'] must be defined
\n"; exit(); } $parm= $scrip= ""; $dscr = substr($_SERVER['HTTP_REFERER'],strpos($_SERVER['HTTP_REFERER'],'/',10)); if (($j=strpos($dscr,'?'))!=0) { $parm=substr($dscr,$j+1); $dscr=substr($dscr,0,$j); } # $dscr - directory and script name sel_db('log'); $msq="INSERT INTO `callomyby` ". "(`datim`,`ipaddr`,`pagename`,`params`,`browser`) VALUES ". "(now(),'{$_SERVER['REMOTE_ADDR']}','$dscr','$parm','". addslashes($_SERVER['HTTP_USER_AGENT']) ."')" ; $insres= ( mysql_query($msq) ? '' : mysql_error() ); # echo 'insres = '. $insres .'
/n'; if (($j=strpos($dscr,'/',1))!=0) { $res=substr($dscr,0,$j); $scrip=substr($dscr,$j); } else $res=$dscr; # echo "$res | $scrip
\n"; if (($fixrow=do_query($dscr))==FALSE) { $fixrow=do_query($res); } # first try whole directory and script name, which failing try directory name if ($fixrow) { # echo "Found {$fixrow['fixtype']}"; switch ($fixrow['fixtype']) { case 1: # Invalid script name in known directory name default: do_404(); break; case 2: # Known script name in home directory header("HTTP/1.1 400 Bad request"); echo "

{$_SERVER['HTTP_REFERER']} seems to have gone missing

"; break; case 9: header("HTTP/1.1 301 Moved permanently"); header("Location: {$fixrow['newpath']}"); break; case 10: header("HTTP/1.1 301 Moved permanently"); header("Location: {$fixrow['newpath']}$scrip"); break; } } else { do_404(); } exit(); ?> default 40x page
$errcod"; $x=htmlspecialchars($_SERVER['REQUEST_URI']); if (strlen($a=$_SERVER['REDIRECT_STATUS'])>0) { echo "Status received: $a - {$cods[$a]}
 
\n"; } echo "Alternatives to: $x
 
\n"; if ($fixrow['fixtype']==0) { echo "The same resource on RHaworth.net
 
\n"; } ?> RHaworth photo galleries
RHaworth - home page
All my presences