DMOZ listing checker
By Craig
This snipet will check if a domain or site is listed at dmoz directory.
You can create a form where you can enter the name of the domain or site url you want to check or you can directly type in at your web browser.
You can use also this script to check multiple domain listing at dmoz, using the textarea to enter those domains and loop them at this script.
PHP Code:
<?php
$domain = trim($_GET[urls]); //You can also use $_POST if the method you use from your form is post
if(!empty($domain){
$result =”<b>DMOZ Listing Query Result </b> “;
$path =”http://search.dmoz.org/cgi-bin/search?search=”.str_replace(”www.”, “”, $domain);
$data = strip_tags(implode(”", file($path)));
if(strpos($data, “No Open Directory Project results found”)) {
$data = “Not Listed “;
} else {
$data = “Listed “;
}
echo “<tr> $domain $data <a href =’$path’>View</a>”;
}
?>