protected function checkIfCrawlable($uri)
{
if (empty($uri) === true) {
return false;
}
$stop_links = array('@^javascript\\:.*$@i', '@^#.*@', '@^mailto\\:.*@i', '@^tel\\:.*@i', '@^fax\\:.*@i');
foreach ($stop_links as $ptrn) {
if (preg_match($ptrn, $uri) === 1) {
return false;
}
}
return true;
}