PHP collection program from home Oh, come on, take it out. PHP acquisition Code, PHP collector, will probably become a PHP forum acquisition program, automatic acquisition program PHP PHP acquisition principle is to read the content of remote articles and then we want to use things,
<?php
Set_time_limit (0); Set document never Expires
$url =$_post["url"];//url
$start =$_post["Start"];//
$end =$_post["End"];//
$encode _start =$_post["Encode_start"]; Get the content code started
$encode _end =$_post["encode_end"];//get content to end
$type =$_post["Select"];//main class
$ztype =$_post["Select2"];//subclass
$admin =$_post["admin"];//user
$r _type =$_post[' type '];
$c _total = 0;
for ($i = $start; $i <= $end; $i + +) {
$getreal = $url. $i. " HTML ";
Echo $getreal;
echo "<br>";
@sava_data (New_content) (GetContent ($getreal), $r _type, $encode _end), $type, $admin, $ztype);
$c _total++;
}
echo "altogether gathers". ($c _total). " Article ";
echo "<a href=# onclick=\" javascript:history.back (); \ ">Back</a>";
Print_r (new_content getcontent (' http://www.diybl.com/course/4_webprogram/php/phpshil/2007828/69928.html '), ' AA ', ' AA '));
echo ' x Iloveyou<p></p><br>ffdafdafds ';
function GetContent ($url)
{
$retmsg =file_get_contents ($url);
return $retmsg;
}
function New_content ($retmsg, $replace, $class) {
$r _type= "-DDD";
$start = "<input type=\" button\ "value=\" ss "Onclick=\" Tosearch (DOCUMENT.ALL.WD2); \ "><p>";
$end = "<strong><font color=\" #CC0000 ">sss fall </font></strong>";
$arr 1 =explode ($start, $retmsg);
$arr 2 =explode ($end, $arr 1[1]);
$ts =preg_replace ("/<a href=" (. +?) [^>]*>/"," ", $arr 2[0]); * Clear Connection <a href= (. +?) [^>]*>*/
$ts =preg_replace ("/]*>/im", "", $arr 2[0]);/* Clear Connection * *
$ts = @str_replace ("(SSS", ", $ts);
Preg_match ('/<title> (. +?) <\/title>/', $retmsg, $arr);/* Get title * *
$p = @str_replace ("$replace", "", $arr [1]);
$ts =substr ($ts, 0,strlen ($ts)-70);
return $value =array ($p, $ts);
}
function Sava_data ($lvalue, $type, $admin, $ztype) {
$tsql = "SELECT * from filecontent where title= '". Addslashes ($lvalue [0]). "'";
$result =mysql_query ($tsql) or Die (Mysql_error ());
if (!mysql_num_rows ($result)) {
$title _ =strip_tags ($lvalue [0]);
$content _ =addslashes ($lvalue [1]);
@mysql_query ("Insert into Filecontent (title,content,filesendid,filesendtime,siteindex,systype,z_type) value (' $ Title_ ', ' $content _ ', ' $admin ', ' ". Date (" y-m-d ")." ', ' 1 ', ' $type ', $ztype) ";
}}
Original: Www.111cn.net