Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SEO Assistant


Jack_mcs

Recommended Posts

hi,

 

Im about to install this contribution that seems great, but ti think i have a problem with the "Ultimate SEO" contrib (i know its not the right thread, but seems that the SEO thread is "resting"...):

 

The problem is, that the search engines does see the sessions id, and its not working. lets say a user is enter for the first time in the site, the url will show the session ID but after page or two, it will dissapear, still, the search engines ( have checked google, yahoo so far) are registrting it with the session ID which is not so very good (i dont want to say BAD, but it is...).

 

Does any one have any ideas?

 

browse around the site (products etc.) and see how the url is changing.

can it be the cache option thats enabled?

 

http://www.jjudaica.com

 

 

pls help...

 

Sharon.

Edited by sukarya

Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Link to comment
Share on other sites

Ultimate SEO has nothing to do with this contribution. You need to ask your question in the Ultimate SEO thread. As for the search engines seeing the SID's, that is because you don't, or didn't, have the prevent spider option set.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...

Hi all,

 

Thanks for all the support. Everything was working fine until I noticed 2day that the get google pr gave me this error

 

Warning: file(http://www.google.com/search?client=navclient-auto&ch=61146203445&ie=UTF-8&oe=UTF-8&features=Rank&q=

info:www.mysite.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/mview/public_html/admin/includes/functions/seo_assistant.php on line 96

 

Warning: implode() [function.implode]: Bad arguments. in /home/public_html/admin/includes/functions/seo_assistant.php on line 97

 

I read the previous threads on how to fix this but with little understanding on what I need to do to fix it.

 

Thank you for any help

 

Eric

Link to comment
Share on other sites

I think a version was uploaded with the fixes mentioned in the last few pages. Try updating your files using that and see if it helps.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi all,

 

Thanks for all the support. Everything was working fine until I noticed 2day that the get google pr gave me this error

 

Warning: file(http://www.google.com/search?client=navclient-auto&ch=61146203445&ie=UTF-8&oe=UTF-8&features=Rank&q=

info:www.mysite.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/mview/public_html/admin/includes/functions/seo_assistant.php on line 96

 

Warning: implode() [function.implode]: Bad arguments. in /home/public_html/admin/includes/functions/seo_assistant.php on line 97

 

I read the previous threads on how to fix this but with little understanding on what I need to do to fix it.

 

Thank you for any help

 

Eric

 

 

I`m getting the same problem .. coincidently this only started happening after i moved hosts? ... I have updated everything to the latest releases also tried removing the 6 from &ch=$ch ... "Allow_url_fopen" is on.

 

any ideas ?

Link to comment
Share on other sites

  • 2 weeks later...

hi guys,

i sintalled this tool and got this errorL

 

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at htdocs/admin/includes/database_tables.php:81) in htdocs/admin/includes/functions/sessions.php on line 67

 

many thanks in advance

Link to comment
Share on other sites

I've updated my SEO assistant version and everything is working as it should apart from the googlerank function.

 

As a lot of people seem to have problems with this, getting the 403 error from google, I thought I just let you know what I found out about this.

 

The problem is not with the webhost as such. It has nothing to do with allow_url_fopen and no workaround with curl is needed. The error comes from google as a result of a wrong parameter (ch).

 

There are quite a few algorithms out there to calculate the checksum from any given url but it seems that the result depends on how the server in combination with the php version installed handles different data types.

 

I couldn't find a working algorithm for my hosts system but I found a working checksum for my shop so I just hardcoded that in. As a result I cannot get any other page ranks.

 

I hope that helps to clear up the confusion why the pagerank works on some systems while it doesn't work on others.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

No, that didn't work either. I found some other code and pasted that in. Now it works fine for me.

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

If it's not specific to your shop, you might want to paste it here so that others who might have the problem can find a fix.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Based on v_1.8A i replaced the following code in /catalog/admin/includes/functions/seo_assistant.php (lines 11 - 115):

	define('GMAG', 0xE6359A60);

function xor32($a, $B) {
  return int32($a) ^ int32($B);
}

//return least significant 32 bits
//works by telling unserialize to create an integer even though we provide a double value
function int32($x) {
  return unserialize("i:$x;");
}

function mix($a,$b,$c) {
  $a -= $b; $a -= $c; $a = xor32($a,zeroFill($c,13));
  $b -= $c; $b -= $a; $b = xor32($b,$a<<8);
  $c -= $a; $c -= $b; $c = xor32($c,zeroFill($b,13));
  $a -= $b; $a -= $c; $a = xor32($a,zeroFill($c,12));
  $b -= $c; $b -= $a; $b = xor32($b,$a<<16);
  $c -= $a; $c -= $b; $c = xor32($c,zeroFill($b,5));
  $a -= $b; $a -= $c; $a = xor32($a,zeroFill($c,3));
  $b -= $c; $b -= $a; $b = xor32($b,$a<<10);
  $c -= $a; $c -= $b; $c = xor32($c,zeroFill($b,15));
  return array($a,$b,$c);
}

//unsigned shift right
function zeroFill($a, $B)
{
   $z = hexdec(80000000);
       if ($z & $a)
       {
           $a = ($a>>1);
           $a &= (~$z);
           $a |= 0x40000000;
           $a = ($a>>($b-1));
       }
       else
       {
           $a = ($a>>$B);
       }
       return $a;
} 

function GCH($url, $length=null, $init=GMAG) {
   if(is_null($length)) {
       $length = sizeof($url);
   }
   $a = $b = 0x9E3779B9;
   $c = $init;
   $k = 0;
   $len = $length;
   while($len >= 12) {
       $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24));
       $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24));
       $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24));
       $mix = mix($a,$b,$c);
       $a = $mix[0]; $b = $mix[1]; $c = $mix[2];
       $k += 12; 
       $len -= 12;
   }

   $c += $length;
   switch($len)              /* all the case statements fall through */
   {
       case 11: $c+=($url[$k+10]<<24);
       case 10: $c+=($url[$k+9]<<16);
       case 9 : $c+=($url[$k+8]<<8);
         /* the first byte of c is reserved for the length */
       case 8 : $b+=($url[$k+7]<<24);
       case 7 : $b+=($url[$k+6]<<16);
       case 6 : $b+=($url[$k+5]<<8);
       case 5 : $b+=($url[$k+4]);
       case 4 : $a+=($url[$k+3]<<24);
       case 3 : $a+=($url[$k+2]<<16);
       case 2 : $a+=($url[$k+1]<<8);
       case 1 : $a+=($url[$k+0]);
        /* case 0: nothing left to add */
   }
   $mix = mix($a,$b,$c);
   /*-------------------------------------------- report the result */
   return $mix[2];
}

//converts a string into an array of integers containing the numeric value of the char
function strord($string) {
   for($i=0;$i<strlen($string);$i++) {
       $result[$i] = ord($string{$i});
   }
   return $result;
}

function CheckSum($_url) {
  $chksum = "6" . GCH(strord('info:'.$_url));
  return $chksum;
}

function getPR($_url) {
  $url = 'info:'.$_url;
  // $ch = "6" . GCH(strord($url));
  $ch = CheckSum($_url);
  $url='info:'.urlencode($_url);
  $pr = file("http://www.google.com/search?client=navclient-auto&ch=$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$url");
  $pr_str = implode("", $pr);
  return substr($pr_str,strrpos($pr_str, ":")+1);
}

 

with this:

//PageRank Lookup v1.1 by HM2K (update: 31/01/07)
//based on an alogorithm found here: [url="http://pagerank.gamesaga.net/"]http://pagerank.gamesaga.net/[/url]

//settings - host and user agent
$googlehost='toolbarqueries.google.com';
$googleua='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5';

//convert a string to a 32-bit integer
function StrToNum($Str, $Check, $Magic) {
   $Int32Unit = 4294967296;  // 2^32

   $length = strlen($Str);
   for ($i = 0; $i < $length; $i++) {
       $Check *= $Magic; 	
       //If the float is beyond the boundaries of integer (usually +/- 2.15e+9 = 2^31), 
       //  the result of converting to integer is undefined
       //  refer to [url="http://www.php.net/manual/en/language.types.integer.php"]http://www.php.net/manual/en/language.types.integer.php[/url]
       if ($Check >= $Int32Unit) {
           $Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit));
           //if the check less than -2^31
           $Check = ($Check < -2147483648) ? ($Check + $Int32Unit) : $Check;
       }
       $Check += ord($Str{$i}); 
   }
   return $Check;
}

//genearate a hash for a url
function HashURL($String) {
   $Check1 = StrToNum($String, 0x1505, 0x21);
   $Check2 = StrToNum($String, 0, 0x1003F);

   $Check1 >>= 2; 	
   $Check1 = (($Check1 >> 4) & 0x3FFFFC0 ) | ($Check1 & 0x3F);
   $Check1 = (($Check1 >> 4) & 0x3FFC00 ) | ($Check1 & 0x3FF);
   $Check1 = (($Check1 >> 4) & 0x3C000 ) | ($Check1 & 0x3FFF);	

   $T1 = (((($Check1 & 0x3C0) << 4) | ($Check1 & 0x3C)) <<2 ) | ($Check2 & 0xF0F );
   $T2 = (((($Check1 & 0xFFFFC000) << 4) | ($Check1 & 0x3C00)) << 0xA) | ($Check2 & 0xF0F0000 );

   return ($T1 | $T2);
}

//genearate a checksum for the hash string
function CheckHash($Hashnum) {
   $CheckByte = 0;
   $Flag = 0;

   $HashStr = sprintf('%u', $Hashnum) ;
   $length = strlen($HashStr);

   for ($i = $length - 1;  $i >= 0;  $i --) {
       $Re = $HashStr{$i};
       if (1 === ($Flag % 2)) {              
           $Re += $Re;     
           $Re = (int)($Re / 10) + ($Re % 10);
       }
       $CheckByte += $Re;
       $Flag ++;	
   }

   $CheckByte %= 10;
   if (0 !== $CheckByte) {
       $CheckByte = 10 - $CheckByte;
       if (1 === ($Flag % 2) ) {
           if (1 === ($CheckByte % 2)) {
               $CheckByte += 9;
           }
           $CheckByte >>= 1;
       }
   }

   return '7'.$CheckByte.$HashStr;
}

//return the pagerank checksum hash
function getch($url) { return CheckHash(HashURL($url)); }

//return the pagerank figure
function getpPR($url) {
global $googlehost,$googleua;
$ch = getch($url);
$fp = fsockopen($googlehost, 80, $errno, $errstr, 30);
if ($fp) {
   $out = "GET /search?client=navclient-auto&ch=$ch&features=Rank&q=info:$url HTTP/1.1\r\n";
   //echo "<pre>$out</pre>\n"; //debug only
   $out .= "User-Agent: $googleua\r\n";
   $out .= "Host: $googlehost\r\n";
   $out .= "Connection: Close\r\n\r\n";

   fwrite($fp, $out);

   //$pagerank = substr(fgets($fp, 128), 4); //debug only
   //echo $pagerank; //debug only
   while (!feof($fp)) {
		$data = fgets($fp, 128);
		//echo $data;
		$pos = strpos($data, "Rank_");
		if($pos === false){} else{
			$pr=substr($data, $pos + 9);
			$pr=trim($pr);
			$pr=str_replace("\n",'',$pr);
			return $pr;
		}
   }
   //else { echo "$errstr ($errno)<br />\n"; } //debug only
   fclose($fp);
}
}
// end new code for PR

 

This works fine in my shop. The only thing I didn't fix is the output of checksum in /catalog/admin/seo_assistant.php as modified in v_1.8A.

 

abra

Edited by abra123cadabra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

  • 2 weeks later...

My catalogue section and product info pages are all in googles suplimentary index. Will this contribution help get them out?

Based on OsCommerce 2.2 MS2 - Mods Including: Customer Approval, STS Template System, OS-CMS, Sage Line 50 Sync, Locate a Stockist, Auto Thumbnailer, Easy Populator, Visitors Stats, Extra Images, Header Tags Controller, Unsold Cart, Products w/o Description/Prices/Images Reports, Backup Customers Table, Login to See Prices. Full customised products_info.php page. OSC Links Manager. Minimum Order Amount. Visitor Web Stats. Google Sitemap. All products page (user sitemap).

 

The OsCommerce Site is hosted on 1 domain with 20 feeder domains extracting data from OS-CMS & the shop catalogue.

 

If you would like to view my website in relation to any of my posts you can google my forum username to find my URL or add a (dot)co(dot)uk to the end of it.

Link to comment
Share on other sites

  • 3 weeks later...

I use seo assistant 1.7

 

I noticed today that my Link popularity for Google, Hotbot, MSN all stopped working and show 0(view). If I click (view) for google or hotbot I get lots of results, but the counts are not showing up in seo-assistant. MSN (view) is just dead-does nothing but new window blank page.

 

Is it just me? or does this contribution need to be updated?

 

 

also a bug possibly? seo-assistant link poularity sends this to google

 

http://www.google.com/search?hl=en&lr=...ww.mydomain.com

 

which shows in the google window search bar as

 

link:www.mydomain.com

 

and gives me very few results.

 

If I change the entry to (note inserted space)

 

link: www.mydomain.com

 

and press enter, I get all the results I would expect to see, and lots of them.

 

Can anyone explain this behaivor? Just FYI

-Dave

Link to comment
Share on other sites

Google has apparently changed their search string again. In admin/includes/functions/seo_link_popularity.php, find this line

linkcheck("http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A".$link_url, 'google');

and change it to

linkcheck("http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A+".$link_url, 'google');

 

For the second problem, when you type in

link:www.mydomain.com
you are checking for sites that link to your site. When you type in
link: www.mydomain.com
you are checking for any site that contains the word "Link" and your domain name -"www.mydomain.com". If you look at the results returned by the latter, you will see Links (or some variation) in the description of each entry.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hey Jack,

 

Thanks for all your help and support with this thread. I know that it is a redundant topic here but I have installed the newest version 1.9 and checked my allow_url_fopen = On and did all the things that carlos talked about in his step by step debugging except I don't know how to get the checksum for my site. www.nitrocountryrc.com. I still am getting

 

Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-5923663149417389559&ie=UTF-8&oe=UTF-8&features=Rank&q=info:nitrocountryrc.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/nitrocou/public_html/admin/includes/functions/seo_assistant.php on line 111

 

Warning: implode() [function.implode]: Bad arguments. in /home/nitrocou/public_html/admin/includes/functions/seo_assistant.php on line 112

 

I am not sure what I am missing.

 

Any help would be apprecitated

 

Thad

When you have eliminated the impossible, whatever remains, however improbable, must be the truth.

-Sherlock Holmes

Link to comment
Share on other sites

That's strange that you are still having the problem since the fix by Carlos seemed to have fixed everyone else's problem. Maybe it is a php compatibility problem? In any event, find this code in your admin/includes/functions/seo_assistant.php file

$chksum = "6" . GCH(strord('info:'.$_url));

and change it to

$chksum = '6-1610651549';

That might work for you.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

First of all I need to give some well-deserved thanks to Jack for this contribution, and for his renewed help & support everywhere in the forums! There are some names like this, when I see posts or contributions from them, I know that it's good information/contributions, and that I can rely on it... :)

 

I have installed the v1.9 and it works very well for me. It's more than what I could have asked for!

 

There are however 2 small bugs I had:

 

1- In "Index Position", (when "show results" is enabled), the url returned are incomplete, e.g.:

----------

Google

The site akash.de is not in the top 50 for the term tusli tee on Google

 

1 www.tee-

2 www.tee-

3 www.satz

4 www.tage

5 www.tage

6 www.scho

7 www.scho

8 www.tusl

9 www.tees

10 berlin.c

11 www.hamb

12 diaet.ab

13 www.ayur

14 forum.ar

15 www.froh

[...]

----------

 

I discovered that on one of my sites which has a short url (akash.de - 8 characters). Strangely enough, the returned urls are all cut after 8 characters!

I tried with different url length and that seemed related. If I input "go.to" (5 characters) the url returned are:

1 www.g

2 www.q

3 www.q

4 www2.

5 www.b

6 books

(all 5 characters)

 

Thats' interesting! Anyone has a similar issue?

 

 

2- And, at the moment, I always have the same results for msn - which is no results:

 

The site [anysite] is not in the top 50 for the term [anysearch] on msn

 

even if I'm search for the first site appearing for a specific keyword on msn.

 

Could it be possible that msn recently changed it's search strings, or something similar?

 

 

-Ben

Link to comment
Share on other sites

Hi all !

 

First of all I want to say thanks to all who contribute to this and any other contribution! Great work! :thumbsup:

 

I've recently installed SEO Assistant and I'm very satisfied with this tool(contribution) but I have a problem when I'm trying to see any site position (Index Position) or Link Popularity in Google !

 

When I try to get the Index Position it returns the following error(warning):

 

Warning: fopen("http://www.google.com/search?as_q=enter+search+word(s)&num=10&hl=en&ie=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_nlo=&as_nhi=&as_occt=any&as_dt=i&as_sitesearch=&safe=images&start=0", "r") - Success in /var/www/html/admin/includes/modules/seo_position.php on line 39

 

Unable to open remote file http://www.google.com/search?as_q=enter+se...ges&start=0.

Warning: fclose(): supplied argument is not a valid File-Handle resource in /var/www/html/admin/includes/modules/seo_position.php on line 108

 

When I try to get the Link Popularity it returns the following error(warning):

 

Warning: file("http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A+www.mysite.com") - Success in /var/www/html/admin/includes/functions/seo_link_popularity.php on line 14

 

Warning: Bad arguments to implode() in /var/www/html/admin/includes/functions/seo_link_popularity.php on line 14

 

Warning: file("http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A+www.mysite.com") - Success in /var/www/html/admin/includes/functions/seo_link_popularity.php on line 14

 

Warning: Bad arguments to implode() in /var/www/html/admin/includes/functions/seo_link_popularity.php on line 14

 

Any ideas?

Thanks!

Link to comment
Share on other sites

First of all I need to give some well-deserved thanks to Jack for this contribution, and for his renewed help & support everywhere in the forums! There are some names like this, when I see posts or contributions from them, I know that it's good information/contributions, and that I can rely on it... :)

 

I have installed the v1.9 and it works very well for me. It's more than what I could have asked for!

 

There are however 2 small bugs I had:

 

1- In "Index Position", (when "show results" is enabled), the url returned are incomplete, e.g.:

----------

Google

The site akash.de is not in the top 50 for the term tusli tee on Google

 

1 www.tee-

I can duplicate it here. It is caused by a coding mistake but I don't just what yet. I will put it on the list and post a fix when I find one (though that may be a while).

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi all !

 

First of all I want to say thanks to all who contribute to this and any other contribution! Great work! :thumbsup:

 

I've recently installed SEO Assistant and I'm very satisfied with this tool(contribution) but I have a problem when I'm trying to see any site position (Index Position) or Link Popularity in Google !

 

When I try to get the Index Position it returns the following error(warning):

 

Warning: fopen("http://www.google.com/search?as_q=enter+search+word(s)&num=10&hl=en&ie=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_nlo=&as_nhi=&as_occt=any&as_dt=i&as_sitesearch=&safe=images&start=0", "r") - Success in /var/www/html/admin/includes/modules/seo_position.php on line 39

Be sure your host has the open url option set (see previous posts).

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...