<?php
//Created on 2010-5-10 wolf QQ116311316
include_once("conn.php");
if($_GET[id]<=16&&$_GET[id]>=1){
$con = file_get_contents("http://it.sohu.com/itguonei_26".$_GET[id].".shtml");
$preg = "#<h1>·<a href='(.*)' target='_blank'>(.*)</a><span>#iUs";
preg_match_all($preg, $con, $arr);
foreach ($arr[1] as $id => $values) {
//echo "<a href=\"view.php?url=$values\">" . $arr[2][$id] . "</a>" . "<br>";
mysql_query("INSERT INTO `collect` (`id`, `title`, `url`) VALUES (NULL, '".$arr[2][$id]."', '$values');");
}
$_GET[id]++;
sleep(1);
echo "<script>location.href='li.php?id=".$_GET[id]."'</script>";
}
//========================================================
<?php
//Created on 2010-5-10 Made by Wolf QQ116311316
include_once("conn.php");
$sql="select * from `collect` limit 3";
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
$con=file_get_contents($row[url]);
$preg="#<!-- 正文 st -->(.*)<!-- 正文 end -->#iUs";
echo zz($preg,$con,1);
}
function zz($preg,$con,$num=1){
preg_match($preg,$con,$arr);
return $arr[$num];
}
?>
?>
//Created on 2010-5-10 wolf QQ116311316
include_once("conn.php");
if($_GET[id]<=16&&$_GET[id]>=1){
$con = file_get_contents("http://it.sohu.com/itguonei_26".$_GET[id].".shtml");
$preg = "#<h1>·<a href='(.*)' target='_blank'>(.*)</a><span>#iUs";
preg_match_all($preg, $con, $arr);
foreach ($arr[1] as $id => $values) {
//echo "<a href=\"view.php?url=$values\">" . $arr[2][$id] . "</a>" . "<br>";
mysql_query("INSERT INTO `collect` (`id`, `title`, `url`) VALUES (NULL, '".$arr[2][$id]."', '$values');");
}
$_GET[id]++;
sleep(1);
echo "<script>location.href='li.php?id=".$_GET[id]."'</script>";
}
//========================================================
<?php
//Created on 2010-5-10 Made by Wolf QQ116311316
include_once("conn.php");
$sql="select * from `collect` limit 3";
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
$con=file_get_contents($row[url]);
$preg="#<!-- 正文 st -->(.*)<!-- 正文 end -->#iUs";
echo zz($preg,$con,1);
}
function zz($preg,$con,$num=1){
preg_match($preg,$con,$arr);
return $arr[$num];
}
?>
?>