Do not have the information of the website is very big thing. It is not possible to use pages that have been captured on other websites without webzip. The article we want is in it, how to think of a solution? Because I am more lazy, a manual processing at all I did not think about. But the net still have to do, forced to have no way, made up a PHP program, perhaps can complete this task. :)
The following is the source code for everyone to refer to:
PHP Multi-layer file automatic file conversion system.
Applies to continuous files.
Parameter description
$site directories to work with
$site = "D:/update";
Insert ($site);
function Cchange ($path 1, $path 2) {
$lastchar = "";
$temp =file ($path 1);
for ($i =0; $i $temp [$i]=str_replace ("
"," #br # ", $temp [$i]);
$temp [$i]=str_replace ("
"," #br # ", $temp [$i]);
$lastchar. = $temp [$i];
}
$lastchar =strip_tags ($lastchar);
$handle =fopen ($path 2, "w");
Fwrite ($handle, $lastchar);
Fclose ($handle);
$ctemp =file ($path 2);
$max = 0;
$pos = 0;
$end = "";
for ($i =0; $i Article fetching core processing fields
needs to be perfected
$ctemp [$i]=str_replace ("#br #", "
", $ctemp [$i]);
$ctemp [$i]=ltrim ($ctemp [$i]);
$ctemp [$i]=ereg_replace ("[F]{0,}", "", $ctemp [$i]);
while (substr (Trim ($ctemp [$i]), 0,4) = = "
"){
$ctemp [$i]=trim (substr (Trim ($ctemp [$i]), 4));
}
if (strlen ($ctemp [$i]) >20)
$end. = $ctemp [$i];
}
$handle =fopen ($path 2, "w");
Fwrite ($handle, $end);
Fclose ($handle);
}
function Insert ($path) {
$d =dir ($path);
while ($entry = $d->read ()) {
if ($entry! = "." && $entry! = "...") {
if (Is_dir ($path. " /". $entry)) {
Insert ($path. " /". $entry);
echo $path. "
";
}
if (!is_dir ($path. " /". $entry)) {
Cchange ($path. " /". $entry, $path." /". $entry);
}
}
}
}
?>
Note: This program is not omnipotent, some annoying use of web pages it can not do. But I counted it, and the accuracy rate could reach 90%. If any hero is interested, can help me change, or and I discuss how to change the perfect. My contact information: oicq:7750988,email:cairway@263.net.
http://www.bkjia.com/PHPjc/532126.html www.bkjia.com true http://www.bkjia.com/PHPjc/532126.html techarticle do not have the information of the website is very big thing. It is not possible to use pages that have been captured on other websites without webzip. We want the article in which, how to think ...