我們已經是擦傷搜索引擎結果頁輸出的客戶網站位置分爲定製報告套件的域的PHP腳本。需要修復刮PHP腳本
谷歌在二月的第一週,這阻止我們的腳本檢測頁面上的域名改變了一些東西,我還沒有得到目前的原開發商在辦公室也不能有任何我們的其他工作人員解決了這一點。
我敢肯定,我知道問題出在腳本,它只是,因爲我不是一個開發商,我不能確定什麼每一行實際上做。我們的腳本使用搜索結果中的相關類來確定我們要查找的位置實際在哪裏。
腳本本身仍然運行並輸出HTML罰款。這純粹只是腳本的一部分,表示在頁面上查找未檢測到的「域」。
我明白,你可能會需要我,爲了有更多的信息告知什麼問題,我很樂意爲您提供的文件/編碼是必要的。如果有必要,我也準備爲此付費。
下面是我覺得這個問題是存在的: -
// Note our use of ===. Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos4 === false) {
$mystring5 = $val[0];
$findme5 = $prevlink;
$pos5 = @strpos($mystring5, $findme5);
// Note our use of ===. Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos5 === false) {
$serp = $serp + 1;
echo '<b>'.$serp.'.</b> '.$val[0].'<br /><br />';
$link = get_string_between($val[1], 'href="', '" onmousedown');
$link = str_replace('https://','',$link);
$link = str_replace('http://','',$link);
$link = str_replace('www.','',$link);
$link;
$prevlink = $link;
$prevlink = str_replace(strstr($prevlink, '/'), "", $prevlink);
$sitelen = strlen($row_site_check['website_name']);
$sitefrom_link = substr($link, 0, $sitelen);
if ($sitefrom_link == $row_site_check['website_name']) {
$site_found = 1;
$rank_postion = $serp;
$site_link = $link;
$con = mysql_connect("localhost","dbname","dbpass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
任何幫助將不勝感激。
謝謝。
我不認爲你需要打壓strpos,該文檔不提它產生的錯誤和警告任何。 – 2012-03-01 10:17:46
另外'var_dump'是你的朋友,'get_string_between'在這裏沒有定義,請確保它使用'var_dump'達到預期值。 – 2012-03-01 10:19:05
我不會抑制錯誤。從長遠來看,你只會讓自己的生活更加艱難。 – GordonM 2012-03-01 10:19:56