This article is an article collection function implemented in PHP. It is just a simple function but the source code is very small. It is suitable for small collection functions.
This article is an article collection function implemented in PHP. It is just a simple function but the source code is very small. It is suitable for small collection functions.
set_time_limit(0);
?>
$filecontent = getcontent('http://111cn.cn');
$ start = 's;
$end ='b;
$art = 311;
$str = '';
preg_match('/
function savato($filename,$content){
if( !empty( $content ) ){
$info = fopen($filename,'w+');
fwrite($info,$content);
fclose($info);
echo "Save file $filename successfully
";
}else{
echo 'Article update failed, Click to update again';
}
}
function replaceHtml($str){
$temp = str_replace(' ',' ',$str);
$temp = str_replace('
',chr(10),$temp );
$ return strip_tags($temp);
}
?>