eoth; if (!file_exists($kfname) || !is_readable($kfname)) { tongji(); exit('Please enter the correct Keyword list file (xml format, please refer to the readme file)! '); } libxml_use_internal_errors(true); $doc = new domdocument(); $doc->load($kfname); if (!$doc->schemavalidate('kw.xsd') ) { print 'Error found in keyword list xml file! '; libxml_display_errors(); tongji(); exit; }
//Extract the keyword list and corresponding domain name from the xml file $kwlist = array(); $g = 1; $kgroups tutorial = $doc->getelementsbytagname("kgroup"); foreach ($kgroups as $kgroup) { $kwlist[$g]['domain'] = trim($kgroup->getelementsbytagname("kdomain")->item(0)->nodevalue); $kwords = $kgroup-> getelementsbytagname("kword"); $w = 1; foreach ($kwords as $kword) { if ($kword->haschildnodes()) { $kwlist[$g]['kword'][$w] = trim($kword->firstchild->nodevalue); } $w++; } $g++ ; } ?>
function get_dm_weight($h, $i) { //$h represents the url of the search results, $i represents the result ranking $p = ceil($i / 10); //What page of the search results
http://www.bkjia.com/PHPjc/444787.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/444787.htmlTechArticle!doctype html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml head meta http-equiv=con...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn