function getcontent($url,$html,$version,$google,$key1,$key2,$key3,$title)
{
/*$ch =@curl_init($url);
ob_start();
curl_exec ($ch);
$retmsg=ob_get_contents();
ob_clean();
ob_end_flush();
curl_close ($ch);
*/
$retmsg=file_get_contents($url);
这里可以用多种读取远程文章的办法
$handle=fopen(getcwd().$html,'w+');
$retmsg=str_replace(array('{google_version}','{google}','{key1}','{key2}','{key3}','{title}'),array($version,$google,$key1,$key2,$key3,$title),$retmsg);
if(!fwrite($handle,$retmsg)){
echo 'cant writeBack';
}else{
echo "sava successBack";
}
fclose($handle);
}
|