例如:在这个域http://www.example.com/234234/go.html是只有一个iframe代码PHP的爆炸:如何下载和拆分特定的HTML部分?
我怎样才能在iframe代码中的网址?
go.html:
<iframe style="width: 99%;height:80%;margin:0 auto;border:1px solid grey;" src="i want this url" scrolling="auto" id="iframe_content"></iframe>
我有这个片段中,但它非常糟糕的编码..
function downloadlink ($d_id)
{
$res = @get_url ('' . 'http://www.example.com/' . $d_id . '/go.html');
$re = explode ('<iframe', $res);
$re = explode ('src="', $re[1]);
$re = explode ('"', $re[1]);
$url = $re[0];
return $url;
}
谢谢!
我添加了一个不同的方法来回答你以前的问题:http://stackoverflow.com/questions/2563256/php-explode-and-get-url-not-showing-up-the-url/2563295# 2563295 – 2010-04-01 20:53:05
为什么有两个问题? – 2010-04-01 21:01:10