2013-07-23 31 views
0

我需要檢查Xenu應用程序在我的網站上查看鏈接。Xenu鏈接檢查器無法在html代碼中看到url鏈接

在我的網站上有HTML代碼。

<img src="mysite/pictures.php?url=http://othersite.com/pic1.jpg"> 
<img src="mysite/pictures.php?url=http://othersite.com/pic2.jpg"> 
<img src="mysite/pictures.php?url=http://othersite.com/pic3.jpg"> 

但Xenu無法檢查圖片是否存在。我可以用pictures.php內的一些腳本來做到這一點嗎?

我需要檢查例如參數中的鏈接是否爲JPG圖片。 我無法更改HTML代碼,因爲它必須保持不變。所以我必須用一些PHP腳本來完成。

+0

沒有人能幫助我嗎? – kassprek

+0

也許在JavaScript中的東西?在html代碼中,我有 kassprek

回答

0

你有很多方法可以做到這一點的最好,因爲我一直用的是Simple HTML DOM: -

<?php 
    include(simple_html_dom); 
    $html=new simplehtmldom(); 
    $html->file_get_html('http://exampl.com'); 
    foreach($html->find(img)->src as $scr) { 
    echo=strplace('mysite/pictures.php?url=','',$scr); 
     } 
    ?>