主题:php采集编码问题
$buffer = @file_get_contents('http://www.baidu.com/s?wd=site%3A' . $site, 'r');
if($buffer) {
$BaiduSite = cut($buffer, '找到相关网页', '篇');
$BaiduSite = str_replace(array('约', ','), '', $BaiduSite);
}
碰到 UTF-8 编码的站就不行了 怎么要怎么办????
if($buffer) {
$BaiduSite = cut($buffer, '找到相关网页', '篇');
$BaiduSite = str_replace(array('约', ','), '', $BaiduSite);
}
碰到 UTF-8 编码的站就不行了 怎么要怎么办????