function preg_substr($start, $end, $str) // 通常のインターセプト関数
{
$temp = preg_split($start, $str); $temp = preg_split($start, $str);
$content = preg_split($end, $temp[1]); $content = preg_split($end, $temp[1]);
$content[0] を返します
}
function str_substr($start, $end, $str) // 文字列インターセプト関数
{
$temp = 爆発($start, $str, 2); $temp = 爆発($start, $str, 2);
$content = 爆発($end, $temp[1], 2); $content = 爆発($end, $temp[1], 2);
$content[0] を返します
}
//----------------使用例----------------
$str = iconv("UTF-8", "GB2312", file_get_contents("http://www.bkjia.com"));
echo ('Title: ' . str_substr("
echo ('Content: ' . str_substr('
?>
http://www.bkjia.com/PHPjc/371583.html
www.bkjia.com
http://www.bkjia.com/PHPjc/371583.html