'120','167' => '119','34' => '121','79' => '124','101' => '136','103' => '149','104'=>'145'); Header( "HTTP/1.1 301 Moved Permanently" ); if($id) { $file = fopen('a_db',"r"); while (! feof($file)) { $string = fgets($file); if(preg_match("/$id/", $string)) { $i = trim(str_replace("$id","",$string)); } } fclose($file); if($i) { Header( "Location: http://www.pizzamarketplace.com/article.php?id=$i&prc=$rcarray[$rc]" ); } else { Header( "Location: http://www.pizzamarketplace.com/" ); } } else { $rcarray[$rc] += 0; if($rcarray[$rc] == 0) $rcarray[$rc] = 120; Header( "Location: http://www.pizzamarketplace.com/research.php?rc_id=$rcarray[$rc]" ); } ?>