2011-08-26 30 views
1

我有超過20k鏈接檢查。 這些是快速分享和文件鏈接。 現在我正在使用'file_get_content',並檢查一個文件服務鏈接內容是否包含'此文件可能違反了版權所有者或被上傳者刪除。將其標記爲「已刪除」和「未找到文件」。爲rapidshare鏈接。hotfile,rapidshare的鏈接檢查器

if (strpos($var2, "This file was either in breach of a copyright holder or deleted by the uploader.")) {... 
if (strpos($var, "File not found.")) {... 

的事情是,當我加入這個file_get_content真的很慢甚至:

$context = stream_context_create(array('http' => array('header'=>'Connection: close'))); 
$var = file_get_contents($url,false,$context); 

如果有任何其他替代辦法做得更快? 腳本運行了一個多小時,我有5k鏈接檢查...

回答

0

你是否嘗試多線程和其他語言像C來做檢查?

0

這兩項服務都向公衆提供API,閱讀他們的文檔。