report.ctrl.php (seopanel.v.4.7.0) | : | report.ctrl.php (seopanel.v.4.8.0) | ||
---|---|---|---|---|
skipping to change at line 629 | skipping to change at line 629 | |||
if (!empty($matches[1])) { | if (!empty($matches[1])) { | |||
$pageContent = $matches[1]; | $pageContent = $matches[1]; | |||
} | } | |||
} | } | |||
} | } | |||
return $pageContent; | return $pageContent; | |||
} | } | |||
# func to crawl keyword | # func to crawl keyword | |||
function crawlKeyword( $keywordInfo, $seId='', $cron=false, $removeDuplic ate=true) { | function crawlKeyword( $keywordInfo, $seId='', $cron=false, $removeDuplic ate=true) { | |||
// check whether any api source is enabled for crawl keyword | ||||
list($resDataStatus, $resData) = SettingsController::getSearchResults | ||||
($keywordInfo, $this->showAll, $seId, $cron); | ||||
if ($resDataStatus) { | ||||
$this->seFound = true; | ||||
if (!empty($seId)) { | ||||
$this->seFound = isset($resData[$seId]['seFound']) ? $resData | ||||
[$seId]['seFound'] : 0; | ||||
} | ||||
return $resData; | ||||
} | ||||
$crawlResult = array(); | $crawlResult = array(); | |||
$websiteUrl = formatUrl($keywordInfo['url'], false); | $websiteUrl = formatUrl($keywordInfo['url'], false); | |||
if(empty($websiteUrl)) return $crawlResult; | if(empty($websiteUrl)) return $crawlResult; | |||
if(empty($keywordInfo['name'])) return $crawlResult; | if(empty($keywordInfo['name'])) return $crawlResult; | |||
// fix for www. and no www. in search results | $websiteOtherUrl = SettingsController::getWebsiteOtherUrl($websit | |||
if (stristr($websiteUrl, "www.")) { | eUrl); | |||
$websiteOtherUrl = str_ireplace("www.", "", $websiteUrl); | ||||
} else { | ||||
$websiteOtherUrl = "www." . $websiteUrl; | ||||
} | ||||
$time = mktime(0, 0, 0, date('m'), date('d'), date('Y')); | $time = mktime(0, 0, 0, date('m'), date('d'), date('Y')); | |||
$seList = explode(':', $keywordInfo['searchengines']); | $seList = explode(':', $keywordInfo['searchengines']); | |||
foreach($seList as $seInfoId){ | foreach($seList as $seInfoId) { | |||
// function to execute only passed search engine | // function to execute only passed search engine | |||
if(!empty($seId) && ($seInfoId != $seId)) continue; | if(!empty($seId) && ($seInfoId != $seId)) continue; | |||
// if search engine not found continue | // if search engine not found continue | |||
if (empty($this->seList[$seInfoId])) continue; | if (empty($this->seList[$seInfoId])) continue; | |||
$this->seFound = 1; | $this->seFound = 1; | |||
// if execution from cron check whether cron already exec uted | // if execution from cron check whether cron already exec uted | |||
End of changes. 3 change blocks. | ||||
7 lines changed or deleted | 17 lines changed or added |