gcsaby Posted April 25, 2007 Posted April 25, 2007 Be sure your host has the open url option set (see previous posts). Jack Hi Jack It happens only for Google. The Index Position works with Yahoo and the Link Popularity returns all the results but not for Google and MSN! Quote
benspun Posted April 25, 2007 Posted April 25, 2007 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 Hi Jack, Great, no problem for the delay, if someone wants to see the full URL of the actual results, www.google.com and others are always available for it! Any idea about this one? 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 (e.g. searching for "spun-shop.com" with url "spun-shop.com". Could it be possible that msn recently changed it's search strings, or something similar? -Ben Quote
Jack_mcs Posted April 25, 2007 Author Posted April 25, 2007 Hi Jack It happens only for Google. The Index Position works with Yahoo and the Link Popularity returns all the results but not for Google and MSN! What are you entering for the search conditions? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Jack_mcs Posted April 25, 2007 Author Posted April 25, 2007 Hi Jack, Great, no problem for the delay, if someone wants to see the full URL of the actual results, www.google.com and others are always available for it! Any idea about this one? 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 (e.g. searching for "spun-shop.com" with url "spun-shop.com". Could it be possible that msn recently changed it's search strings, or something similar? -Ben Yes, that is what happened. To fix that, replace this code in admin/includes/modules/seo_msn_position.php$conditions = "<li class=\"first\">(.*)</li>"; with this $conditions = "<li class=\"dispUrl\">(.*)</li>"; Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
benspun Posted April 25, 2007 Posted April 25, 2007 Yes, that is what happened. To fix that, replace this code in admin/includes/modules/seo_msn_position.php$conditions = "<li class=\"first\">(.*)</li>"; with this $conditions = "<li class=\"dispUrl\">(.*)</li>"; Jack That fixed it, perfect! Thanks. -Ben Quote
Ausgirl Posted June 11, 2007 Posted June 11, 2007 G'Day, Ive been searching this thread and found that most people have my problem either with Google or MSN. Mine is with Zeal. Although it seems to work fine, I get this at the top of the page. I also updated from .7 to .9 Warning: file(http://www.zeal.com/search/results.jhtml?k...scope=directory) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in admin/includes/functions/seo_link_popularity.php on line 127 Warning: implode() [function.implode]: Bad arguments. in admin/includes/functions/seo_link_popularity.php on line 127 Warning: file(http://www.zeal.com/search/results.jhtml?k...scope=directory) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in admin/includes/functions/seo_link_popularity.php on line 127 Warning: implode() [function.implode]: Bad arguments. in admin/includes/functions/seo_link_popularity.php on line 127 It was working fine, then I suddenly got the error, then I updated thinking it would disappear but its still there. :blink: Thanks Quote
Jack_mcs Posted June 11, 2007 Author Posted June 11, 2007 Try changing this line in that file $data = implode("", file($path)); to $data = @implode("", file($path)); or $data = implode("", (array)file($path)); or both $data = @implode("", (array)file($path)); Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Ausgirl Posted June 11, 2007 Posted June 11, 2007 This one did the trick $data = @implode("", file($path)); Thanks Jack Quote
animatco Posted July 6, 2007 Posted July 6, 2007 Jack, I too was receiving the following: Warning: file(http://www.zeal.com/search/results.jhtml?k...scope=directory) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in admin/includes/functions/seo_link_popularity.php on line 127 Warning: implode() [function.implode]: Bad arguments. in admin/includes/functions/seo_link_popularity.php on line 127 Warning: file(http://www.zeal.com/search/results.jhtml?k...scope=directory) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in admin/includes/functions/seo_link_popularity.php on line 127 Warning: implode() [function.implode]: Bad arguments. in admin/includes/functions/seo_link_popularity.php on line 127 I changed lin 127 to $data = @implode("", file($path)); and that fixed the error. Thank you very much for some excellent contributions... Steve Quote
mrhandley Posted July 12, 2007 Posted July 12, 2007 Great contrib! I´m used to use different tools on the web but now´they are all neatly collected in the same place :) Some questions though. # 1. Some times the index position check gives interesting results. Like this search: ---snip--- 4 japan.seekingalpha. ---snip--- The results are hacked up, so that only parts of the url gets reported back to the page. This only seems to happen when I´m outside the topten on the search results. #2. Is it possible to change the search engine that is used? Im running mostly swedish sites (especially the webshops) so the results would be better if it searched google.se, msn.se etc. It would be neat though if one could set the language specific engine to be used. /Mattias Quote
Jack_mcs Posted July 12, 2007 Author Posted July 12, 2007 I have seen the first problem but haven't had time to find the cause. The second is on the list of to do but I can't say when that will be. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
mrhandley Posted July 13, 2007 Posted July 13, 2007 I have seen the first problem but haven't had time to find the cause. The second is on the list of to do but I can't say when that will be. Jack Ok, just curios. I think it is a great tool anyway ;) But for the time beeing, I guess I could change the code so that it uses google.se instead of google.com, right? Is there one place to change like a "define google url=google.com" setting or should i do a search and replace? (the same goes for yahoo and msn by the way). Quote
Jack_mcs Posted July 13, 2007 Author Posted July 13, 2007 A number of places would have to be changed so a search/replace would be the best option. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted July 26, 2007 Posted July 26, 2007 Jack - please could you offer me some help? This contribution seems gret, and i've installed it correctly, from what i beleive. However, when I try an index position test, I get the following: Google The site www.cutepooch.co.uk is not in the top 10 for the term cute pooch on Google MSN The site www.cutepooch.co.uk is not in the top 10 for the term cute pooch on msn Yahoo The site www.cutepooch.co.uk is not in the top 10 for the term cute pooch on Yahoo Using, Total Searches = 10 Enter Search Term = cute pooch Enter URL To Search For = http://www.cutepooch.co.uk However, if you goto www.google.com and search by 'cute pooch' my site is the 4th result. Am I using the assistant incorrectly? Quote
♥Gyakutsuki Posted July 28, 2007 Posted July 28, 2007 Hello, I test in this moment your contrib and I have different results on Google search position. For example if I try (with your code) erp oscommerce with http://www.e-imaginis.com I have this postion : position 39 ( 37 ) on google.com If I click a second time to test this world, I have : position 41 ( 40 ) If I click a third time to terminate the test : I have position 40 ( 38 ) If I put in comment your code /* case "Google": $filename = "http://www.google.com/search?as_q=$query". "&num={$hits_per_page}&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=$i"; */ and I replace by this : case "Google": $filename = "http://www.google.com/search?q=$query.'&hl=en&lr=&as_qdr=all&start=$i&sa=N'"; the results first test : position 41 ( 39 ) second test : position 37 ( 37 ) third test : position 38 ( 38 ) In reality my position is : 40 If I actualise Google, I have always the same position. If I try with oscommerce erp With your code : fisrt test : position 5 ( 5 ) second test : position 7 ( 6 ) third test : position 7 ( 6 ) With the other code : first test : position 7 ( 6 ) second test : position 7 ( 6 ) third test : position 7 ( 6 ) I remark that : More the url is far in google, more the result are randoms, see you can have no result the the url exist in google or the difference between google search result and your code is very different. The second code seems more stable than the first code (I think). My second question what is : {$hits_per_page} we see in for condition and your google url. My third question and last : How to write or found your url google code then the google code is that "http://www.google.com/search?q=$query.'&hl=en&lr=&as_qdr=all&start=$i&sa=N'"; in reality Your contribution is very interesting and congratulation. Thanks Quote Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum
Silverado05 Posted August 30, 2007 Posted August 30, 2007 I have just updated to 1.9 and it looks GREAT I only have one small issue. When I click on Page Ranking to get the page ranking I get this error at the top of the screen. Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-1610651549&ie=UTF-8&oe=UTF-8&features=Rank&q=info:www.txcampingoutfitters.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 111 Warning: implode() [function.implode]: Bad arguments. in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 112 I have applied the solutions on Post #295 & Post #298 and it still doesn't work Here are the lines 111 & 112 from seo_assistant.php $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); Any other ideas that might could try. Like I said I am using 1.9 and this seems to be the only issue I am having. The rest works perfect. Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
Jack_mcs Posted August 30, 2007 Author Posted August 30, 2007 Try placing @ before implode so that it is @implode or try implode("", (array)$pr); Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Silverado05 Posted August 30, 2007 Posted August 30, 2007 Thanks for the quick reply. I added the @ making it $pr_str = @implode("", $pr); which took away this error Warning: implode() [function.implode]: Bad arguments. in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 112 But I am still getting this error for line 111 Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-1610651549&ie=UTF-8&oe=UTF-8&features=Rank&q=info:www.txcampingoutfitters.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 111 This is line 111 $pr = file("http://www.google.com/search?client=navclient-auto&ch=$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$url"); Could their be something wrong with the URL maybe. I was reading something from Carlos about removing $ch from the URL but that should be fixed in 1.9 correct? Is their anything else I can try? -Thanks Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
Jack_mcs Posted August 30, 2007 Author Posted August 30, 2007 Are you typing in info:www.txcampingoutfitters.com as the url? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Silverado05 Posted August 30, 2007 Posted August 30, 2007 Are you typing in info:www.txcampingoutfitters.com as the url? Jack No, I have it set in the DB. I replaced the www.yoursite.com with mine when I ran the SQL so I didn't have to type it in every time. It works with all the other feilds. Should I not do this on this one? Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
Jack_mcs Posted August 30, 2007 Author Posted August 30, 2007 Please disregard my last post. My mind was elsewhere. Checking the PR on your site works fine here. In checking the url you posted to the one I posted they appear as shown (the end of the url's have been truncated sinc ethey are the same): http://www.google.com/search?client=navcli...1610651549& http://www.google.com/search?client=navcli...1083956862& So the problem seems to be the one that Carlos found. You could try downloading his version to see if that fixes it. You only need to replace the includes/functions/seo_assistant.php file. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Silverado05 Posted August 31, 2007 Posted August 31, 2007 Please disregard my last post. My mind was elsewhere. Checking the PR on your site works fine here. In checking the url you posted to the one I posted they appear as shown (the end of the url's have been truncated sinc ethey are the same): http://www.google.com/search?client=navcli...1610651549& http://www.google.com/search?client=navcli...1083956862& So the problem seems to be the one that Carlos found. You could try downloading his version to see if that fixes it. You only need to replace the includes/functions/seo_assistant.php file. Jack Those links above did not work for me, just showed Google error. I tried Carlos verison 1.8 and still getting errors. Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-243818464625365&ie=UTF-8&oe=UTF-8&features=Rank&q=info:www.txcampingoutfitters.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 112 Warning: implode() [function.implode]: Bad arguments. in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 113 Doesn't 1.9 fix all those issues and included Carlos's bug fixes? Am I missing something here? I have read others with the same problem but they seemed to fix it so I don't know why I am having the same problem. Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
Jack_mcs Posted August 31, 2007 Author Posted August 31, 2007 The links I posted were not complete url's. I only posted the part to where the change was to show the difference. But on looking at it now, I see I didn't get the part I meant to. The last version I uploaded had the fixes by Carlos so it should be working for you. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Silverado05 Posted August 31, 2007 Posted August 31, 2007 Ok here is my seo_assistant.php from the latest version 1.9. The only change I have made to it was adding the @ before implode as suggested above. <?php /* SEO_Assistant for OSC 2.2 MS2 v2.0 08.03.2004 Originally Created by: Jack York Released under the GNU General Public License osCommerce, Open Source E-Commerce Solutions Copyright © 2004 osCommerce Changed by: Carlos Frederico Costa - 17/Jan/2007 */ 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 = 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); } function getLinkPopularity($link_url) { $host = "www.google.com"; $path = "/search?hl=en&ie=UTF-8&oe=UTF-8&q=link:" . $link_url; $fp = fsockopen($host, "80", $errno, $errstr); if (! $fp) { echo "$errstr ($errno)<br />\n"; return false; } else { fputs($fp, "GET ".$path." HTTP/1.0\r\nHost: ".$host."\r\n\r\n"); while(!feof($fp)) { $line = fgets($fp, 4096); if (preg_match("/of about/", $line)) { $total_sites = $line; $total_sites = preg_replace("/^.*of about <b>/", "", $total_sites); $total_sites = preg_replace("/<.*$/", "", $total_sites); $total_sites = preg_replace("/\,/", "", $total_sites); $total_sites = trim($total_sites); return $total_sites; } } } } //http://search.yahoo.com/search?p=link%3Ahttp%3A%2F%2Fwww.cre8asiteforums.com%2Findex.php&ei=UTF-8&fr=FP-tab-web-t&n=20&fl=0&x=wrt function get_yahoo_links($domain) { $lines = array(); $host = "search.yahoo.com"; $path = "search?p=link%3Ahttp%3A%2F%2F" . $domain; $fp = fsockopen($host, "80"); if ($fp) { fputs($fp, "GET ".$path." HTTP/1.0\r\nHost: ".$host."\r\n\r\n"); while(!feof($fp)) { $line = fgets($fp, 4096); if (preg_match("/^1 \- /", $line)) { $total_sites = $line; $total_sites = preg_replace("/^.*of /", "", $total_sites); $total_sites = preg_replace("/ .*$/", "", $total_sites); $total_sites = preg_replace("/\,/", "", $total_sites); $total_sites = trim($total_sites); return($total_sites); } } } else { echo "Can't connect to host... "; } } function ListFiles() { $files = array(); $dir = opendir('.'); while(($file = readdir($dir)) !== false) { if($file !== '.' && $file !== '..' && !is_dir($file)) { $files[] = $file; } } closedir($dir); sort($files); return $files; } function checkLinks($url, $idx) { global $badLinks, $totalLinks; $file = @fopen($url,'r'); if (! $file) { $badLinks[$idx] = $url; // echo 'add bad link MAIN '. $url . ' at pos '. $idx . ' result = ' .$badLinks[$idx].'<br>'; $idx++; $totalLinks++; } else { $totalLinks++; while (!feof($file)) { $page_line = trim(fgets($file, 4096)); if (eregi('http:', $page_line)) { $link = stristr($page_line, 'http:'); if ($link !== FALSE) { $pos = strpos($link, '"'); if ($pos !== FALSE) $link = substr($link, 0, $pos); $pos = strpos($link, '?osCsid'); if ($pos !== FALSE) $link = substr($link, 0, $pos); else { $pos = strpos($link, '&osCsid'); if ($pos !== FALSE) $link = substr($link, 0, $pos); } $actual_link = @fopen($link,'r'); $totalLinks++; if (! $actual_link) { $badLinks[$idx] = $link; // echo 'add bad link SUB '. $link . ' at pos '. $idx . ' result = ' .$badLinks[$idx].'<br>'; $idx++; } else { fclose($actual_link); } } } } fclose($file); } } function GetSearchURL($searchurl) { if (strpos($searchurl, "//") !== FALSE) { $a = explode ("//", $searchurl ); $searchurl = $a[1]; } return $searchurl; } function PageLink ($name) { // same page link global $request_type; $link = ($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER; $uri = '/'.substr(getenv(REQUEST_URI), 1); return $link . $uri . '#' . $name; } ?> This is the error I am getting from it. Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-243818464625365&ie=UTF-8&oe=UTF-8&features=Rank&q=info:www.txcampingoutfitters.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/txcampin/public_html/admin/includes/functions/seo_assistant.php on line 111 I am clueless and think I am just cursed at this point. I have tried everything in this thread but nothing seems to work. I must be missing and overlooking something something? Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
Silverado05 Posted August 31, 2007 Posted August 31, 2007 I have tried to call this URL directly in the browser and I get a forbidden page. So is the URL in the file above correct? http://www.google.com/search?client=navcli...goutfitters.com Quote Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.