'3', '4' => '19', '29' => '26', '152' => '7', '17' => '9', '179' => '12', '50' => '13', '3' => '16', '167' => '16', '126' => '20', '2' => '23', '99' => '21', '107' => '5', '106' => '6', '41' => '8', '22' => '15', '31' => '22'); Header( "HTTP/1.1 301 Moved Permanently" ); if($id) { $file = fopen('a_db',"r"); $i = 0; while (! feof($file)) { $string = fgets($file); if(preg_match("/$id/", $string)) { $arr = explode("\t",$string); if($arr[0] == $id) $i = $arr[1]; if($i > 0) break; } } fclose($file); if($i) { Header( "Location: http://www.atmmarketplace.com/article.php?id=$i&prc=$rcarray[$rc]" ); } else { Header( "Location: http://www.atmmarketplace.com/" ); } } else { $rcarray[$rc] += 0; if($rcarray[$rc] == 0) $rcarray[$rc] = 12; Header( "Location: http://www.atmmarketplace.com/research.php?rc_id=$rcarray[$rc]" ); } ?>