As webmaster I want 2 things:
- That the site does not contain malware;
- That I do not link to a site containing malware.
The second option seems to be the hardest, because I don't have control over the sites to which I link. So I thought, may be should I use Google's Safebrowsing website.
With some help of Snoopy I created some PHP code to test if a specific website is suspicious. The idea is good, however the bottleneck is the response time. It takes more than 6 seconds to check 36 external links.
See for example this Dutch testpage and be patient ;-) All external links where created with this PHP function:
function showLink($naam, $titel, $url) {
$snoopy = new Snoopy;
$file = "http://google.com/safebrowsing/diagnostic?site=".$url;
$snoopy->fetchtext($file);
$suspicious = stripos($snoopy->results,"Site is listed as suspicious");
if ($suspicious == FALSE) {
echo "normal external link";
}
else {
echo "warning";
}
}
May be should I leave it to the browsers. When I try to visit the site mashaei.ir with:
- Google Chrome - I get a safety alert
- Mozilla Firefox - I do not get a safety alert
- Mozilla Firefox with the Web Of Trust addon - I get a safety alert
- Safari (on a Mac) - I do not get a safety alert
- Internet Explorer 8 - I do not get a safety alert
- Opera - I do not get a safety alert
Google Chrome, orMozilla Firefox withthe Web Of Trust addon
Update 14 march 2010: There are also Web Of Trust addons for Internet Explorer and Google Chrome. So I advice to browse only with one of the following browsers with the WOT addon.
- Google Chrome
- Mozilla Firefox
- Internet Explorer
Update 28 march 2010: Discovered that the site www.debontestegge.nl is not safe according to Google Chrome and to Mozilla Firefox. Browse safe. Use:
You could also implement the API fully, which would mean keeping a local copy of the list, which would reduce your response time, but make your code more complicated.
ReplyDeletehttp://code.google.com/apis/safebrowsing/