You didn't discuss _php tutorial

Source: Internet
Author: User
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.