Ec (2); & nbsp; & lt ;? Php ** & nbsp; * @ name processing after collection. php & nbsp; * @ dateSatDec2202: 07: 45CST2007 & nbsp; * @ copyright Ma yongzhan (MyZ) & nbsp; * @ author ma yongzhan (MyZ) & nbsp; * @ linkblog.111cn. netma script ec (2); script
/**
* @ Name processing after collection. php
* @ Date Sat Dec 22 02:07:45 CST 2007
* @ Copyright Ma yongzhan (MyZ)
* @ Author ma yongzhan (MyZ)
* @ Link http://blog.111cn.net/mayongzhan/
*/
// Process the collected file. I copied five books here. Which of the following is not convenient? Find it by yourself.
Header (''content-Type: text/html; charset = utf8 '');
Function writer ($ content, $ url)
{
$ Fp = fopen ($ url, ''AB '');
Fwrite ($ fp, $ content );
Fclose ($ fp );
}
// Merge the content from 1 to 136 pages. This is the best...
For ($ I = 1; I I <136; $ I ++ ){
$ Str = file_get_contents (''./myz/'''.polici.''.shtml '');
Preg_match ("/()(.*?) ()(.*?) (
)(.*?) (
)/S ", $ str, $ arr );
$ Arr [6] = preg_replace ("/(] +>. *?] +> )(.*?) ()/S "," $2 ", preg_replace ("/
|
/"," Rn ", $ arr [6]);
$ Result = "rn Jun rn ---------------------------------------------------- rn -------------------------------------------- rn ". $ I. "---------------- Ma yongzhan's directory number :". $ arr [2]. "rn Jun rn ---------------------------------------------------- rn -------------------------------------------- rn ". $ arr [6];
Writer ($ result, "./myz/all.txt ");
}
?>