[请益] LIB_parse return between分析问题

楼主: wEImInGLu (babeCRY)   2014-03-17 21:13:36
小弟我听取各位建议 先练习抓取网址
以下用youtube当范例 我要抓取音乐网址 所以定位用href下的看看能不能找到之后那串
音乐网址
但是我执行出来 是有抓到href后面的东西 但不是音乐网址 请大家帮我看看还要改哪呢
<?php
# Include libraries
include("LIB_parse.php");
include("LIB_http.php");
# Download a web page
$web_page = http_get($target="https://www.youtube.com/watch?v=QjQg0aDbnf0",
$referer="");
# Parse the title of the web page, inclusive of the title tags
$href_incl = return_between($web_page['FILE'], " href=", " href=", INCL);
# Parse the title of the web page, exclusive of the title tags
$href_excl = return_between($web_page['FILE'], " href=", " href=", EXCL);
# Display the parsed text
echo "href_incl = ".$href_incl;
echo "\n";
echo "href_excl = ".$href_excl;
?>
楼主: wEImInGLu (babeCRY)   2014-03-19 19:21:00
http://ppt.cc/iBZf 按下载安装那两个函式包between是定界符号 抓取href后面的网址

Links booklink

Contact Us: admin [ a t ] ucptt.com