php中常用的采集函数的总结(附代码)时间:2024/4/15作者:未知来源:争怎路由网人气: news):\/\//", "", $feed_url);
$server_url = preg_replace("/\/.*/", "", $server_url);
if ($server_url == '') {
return $content;
}
if (isset($protocol[0])) {
$new_content = preg_replace('/href="\//', 'href="'.$protocol[0].$server_url.'/', $content);
$new_content = preg_replace('/src="\//', 'src="'.$protocol[0].$server_url.'/', $new_content);
} else {
$new_content = $content;
}
return $new_content;
} 获取指定标记中的内容 function getTagData($str, $start, $end){
if ( $start == '' 关键词:php中常用的采集函数的总结(附代码) | |