Webnet Official Crawler
• Sites without keywords wont be displayed
• Sites with https wont be displayed
• All links crawled will get inserted to database automatically
• To fix site without keywords shall be applied manually from Database
array('method'=>"GET", 'headers'=>"User-Agent: howBot/0.1\n"));
$context = stream_context_create($options);
$doc = new DOMDocument();
@$doc->loadHTML(@file_get_contents($s_link, false, $context));
$s_title = $doc->getElementsByTagName("title");
$s_title = $s_title->item(0)->nodeValue;
$s_des = "";
$s_key = "";
$metas = $doc->getElementsByTagName("meta");
for ($i = 0; $i < $metas->length; $i++) {
$meta = $metas->item($i);
if (strtolower($meta->getAttribute("name")) == "description")
$s_des = $meta->getAttribute("content");
if (strtolower($meta->getAttribute("name")) == "keywords")
$s_key = $meta->getAttribute("content");
}
echo $s_title ;?>