2015-08-31 42 views

回答

0

本應該做的,把你的鏈接在一個名爲links.txt 文件,並在您要搜索的網址的代碼替換example.com,然後執行

編輯:

<?php 

$theURL = "example.com"; 
$webPagesURLs = " 
http://example.com 
http://example1.com 
https://en.wikipedia.org/wiki/Example.com 
http://example2.com 
"; 
foreach(explode("\n",trim($webPagesURLs)) as $webPageURL){ 
    $webPageContent = @file_get_contents($webPageURL); 
    if(strpos($webPageContent, $theURL) !== false){ 
     print "$theURL Found in <a href=$webPageURL > $webPageURL </a><br>\n"; 
    } 
} 

?> 
+0

謝謝阿卜杜拉。正如你所建議的,我將所有鏈接複製到文件links.txt中,並用上面的代碼創建了一個php頁面並上傳到服務器。它似乎沒有工作。而不是links.txt,我可以設置一個數組中的URL並仍然使用此代碼。對不起,我對編程非常陌生。 –

+0

這個編輯應該有你想要的。 –

+0

這很美。完美的作品。由於我還沒有代表,所以無法支持​​它。但是,謝謝一噸。 –