我怎样才能获得我已经搜索过谷歌并阅读了一些教程但似乎无法理解的 URL 的某个部分,也许有人可以从下面的示例中向我展示。
这是我的代码
<?php
include "simple_html_dom.php";
$title = "fast";
$html = file_get_html("http://www.imdb.com/find?q=".urlencode($title)."&s=all");
$element = $html->find('[class="result_text"] a', 1);
$link = $element->href;
echo $link;
// Clear dom object
$html->clear();
unset($html);
?>
现在这回响
/title/tt0109772/?ref_=fn_al_tt_2
但我只想要 imdb id。
tt0109772
所以有人可以解释或告诉我如何做到这一点
谢谢