Processing after collection of PHP

Source: Internet
Author: User


<?php
/**
* @name after the collection of processing . PHP
* @date Sat Dec 02:07:45 CST 2007
* @copyright Mayong accounted for (Myz)
* @author Mayong accounted for (Myz)
* @link http://blog.111cn.net/mayongzhan/
*/

After the collection of documents And then take care of it. The things here Let me copy 5 books, which is inconvenient to provide, find it yourself.

Header (' Content-type:text/html;charset=utf8 ');

function writer ($content, $url)
{
$fp = fopen ($url, ' ab ');
fwrite ($fp, $content);
fclose ($FP);
}

From 1 to 136 pages of content are merged once. This is the best ...

For ($i =1 $i <136; $i + +) {
$str = file_get_contents ('./myz/'. $i '. shtml ');
Preg_match ("/(
$arr [6] = Preg_replace ("/(<span[^>]+>.*?<a[^>]+>) (. *?) (</a></span>)/S "," $ ", Preg_replace ("/<p>|</p>/"," RN ", $arr [6]));
$result = " RN------------------------------------------------RN------------------------------------------------RN------------------- -----------------------------rn ". $i." ----------------Directory number for Mayong : ". $arr [2]." RN------------------------------------------------RN------------------------------------------------RN------------------- -----------------------------RN ". $arr [6];
writer ($result, "./myz/all.txt");
}
?>

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.