复制代码 <? /******** 说明,为程序简单化,整个程序没有使用正则表达式 (我自己对这个方面也很臭,呵呵,高手别骂) ****/ //定义一个函数,对字符简单的过滤
function str($txt){ $txt= str_replace("'","'",$txt); $txt= str_replace(""",""",$txt); return $txt; } //初始化程序 $magic_quotes_gpc = get_magic_quotes_gpc(); $register_globals = @ini_get('register_globals'); if(!$register_globals ││ !$magic_quotes_gpc) { @extract(daddslashes($HTTP_POST_VARS)); @extract(daddslashes($HTTP_GET_VARS)); if(!$register_globals) { foreach($HTTP_POST_FILES as $key => $val) { $$key = $val['tmp_name']; ${$key.'_name'} = $val['name']; ${$key.'_size'} = $val['size']; ${$key.'_type'} = $val['type']; } } } if (function_exists('set_time_limit') == 1 && @ini_get('safe_mode') == 0) { @set_time_limit(1000); } //end //为防止日后对方修改地址,把地址前部相同的提取出来 $host="[url]http://218.78.213.183:880/daolianmtvfuc__________________kkkkkkkkkk/";[/url] if(!$action){ echo "<a href="t.php?action=start">click here to start</a>"; die(); }else{ $end=3488;//结束ID if(!$id││$id<1)$id=1;//默认ID编号 $url="[url]http://mtv.8391.com/Yxwen.asp?id=".$id;[/url] $str=@file_get_contents($url);//读取页面代码 if($str){ //利用关键字符,分割代码 $a1=explode("value="",$str);//value="来分割字符 //取歌手名称 $n1=explode(""",$a1[1]); $ges=str(trim($n1[0])); //取歌曲名称 $g1=explode(""",$a1[3]); $name=str(trim($g1[0])); //取歌曲地址 $h1=explode("href="",$str); $h2=explode(""",$h1[1]); $mtvurl= str(str_replace($host,"",trim($h2))); //添加数据库 /******** 可根据自己的程序,适当的添加 ********/ } $id++; if($id<=$end){ echo "<a href=t.php?id=$id>cleck here </a>"; echo "<meta http-equiv="refresh" content="0;url=t.php?id=$id">";} else die("program runing over"); } ?>
|