华军文章小偷

$_SESSION['total']) { EXIT("Over"); } if(isset( $_GET['id'])) { $id=intval( $_GET['id']); $page=intval( $_GET['pg']); $arr=unserialize( $_SESSION['zip']); if( $id >= count( $arr)) { $page++; redirect( $_SERVER[PHP_SELF]."?pg=". $page,''); } if(get_content( $arr[ $id]['url'])){ $s=get_content( $arr[ $id]['url']); $f_title=addslashes( $arr[ $id]['title']);//标题 preg_match("/ ```
(.*) (.*)<\/a>/isU", $str, $lines); for( $i=0; $i < count( $lines[1]); $i++) { $url_arr[ $i]['title']= $lines[2][ $i]; $url_arr[ $i]['url']= $prefix_url. $lines[1][ $i]; } $_SESSION['zip']=serialize( $url_arr); $page=intval( $_GET['pg']); redirect( $_SERVER[PHP_SELF]."?pg=". $page."&id=0",''); } } else { $str=get_content(get( $sort,1)); preg_match_all("/ (.*)<\/a>/isU", $str, $lines); for( $i=0; $i < count( $lines[1]); $i++) { $url_arr[ $i]['title']= $lines[2][ $i]; $url_arr[ $i]['url']= $prefix_url. $lines[1][ $i]; } preg_match("/页次:(.*)<\/b>\/(.*)<\/b>/isU", $str, $tmp); $_SESSION['zip']=serialize( $url_arr); $_SESSION['total']= $tmp[2]; redirect( $_SERVER[PHP_SELF]."?pg=1&id=0",''); } function redirect( $url, $str='') { echo $str."\r\n"; echo ""; } function get( $a, $b) { $str="http://news.onlinedown.net/infosort/". $a."_". $b.".htm"; return $str; } function get_content( $url) { $fp=fopen( $url,'r'); while(!feof( $fp)) { $str.=fgets( $fp,4096); } fclose( $fp); return $str; } function del_ads( $str) { $str=preg_replace("//isU",'', $str); return $str; } function put_file( $str, $f_name) { $fp=fopen( $f_name,'a'); fputs( $fp, $str); fclose( $fp); } ?> 程序中途运行时可能会超时,直接回车刷新即可继续运行.
```
Published At
Categories with Web编程
Tagged with
comments powered by Disqus