[請益] LIB_parse return between分析問題

看板PHP作者 (wEImInGLu)時間10年前 (2014/03/17 21:13), 編輯推噓0(002)
留言2則, 1人參與, 最新討論串1/1
小弟我聽取各位建議 先練習抓取網址 以下用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; ?> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 36.238.82.229

03/19 19:21, , 1F
http://ppt.cc/iBZf 按下載安裝那兩個函式包
03/19 19:21, 1F

03/19 19:21, , 2F
between是定界符號 抓取href後面的網址
03/19 19:21, 2F
文章代碼(AID): #1J9lK3C_ (PHP)