Welcome, Guest

Go Back   TechieHQ - Computer Help Forum · » Software & Internet · HTML & Coding
Reload this Page PHP / MySQL : Google Spider & DB Commands

PHP / MySQL : Google Spider & DB Commands

HTML & Coding HTML, XHTML, CSS, XML and other coding issues you may code into.

Reply
 
Thread Tools Display Modes
  #1  
Old Dec 12th, 04, 3:32 AM
D Schrute's Avatar
D Schrute
Assistant Sensei
Posts: 1,249
Status: Offline
 
From: VA & NC
Joined: Aug 2004
Rep: D Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to behold
PHP / MySQL : Google Spider & DB Commands

I am trying to run a database command to allow google to spider my forum topics but i keep getting errors when running this one in particular:

Code:
   ##############################################################  
   ## MOD Title: enhance-google-indexing 
   ## MOD Author: Showscout & R. U. Serious 
 ## MOD Description: If the User_agent includes the string 'Googlebot', then no session_ids are appended to links, which will (hopefully) allow google to index more than just your index-site. 
   ## MOD Version: 0.9.1  
   ##  
   ## Installation Level: easy 
   ## Installation Time: 2 Minutes  
   ## Files To Edit: includes/sessions.php  
   ## Included Files: n/a 
   ##############################################################  
   ## Author Notes: There may be issues with register globals on newer  
   ##	   PHP version. If you know for sure and also how to fix it post in 
   ##	   this thread: http://www.phpbb.com/phpBB/viewtopic.php?t=32328 
   ## 
   ##	   Obviously, if someone thinks it's funny to surf around with a 
   ##	   user_agent containing Googlebot and at the same time does not 
   ##	   allow cookies, he will loose his session/login on every pageview. 
   ##	   Should he complain to you, tell him to eat your shorts. 
   ## 
   ##	   If you want to add further crawlers look at the appropiate line and  
   ##	   feel free to add part of the user_agent which should be _unique_ 
   ##	   unique to that, so a user is never confused with a bot. 
   ##  
   ##############################################################  
   ## Version History: 0.9.0 initial release, only googlebot 
 ##				 	 0.9.1 added inktomi (MSN-search/crawler-bot) 
   ##############################################################  
   ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD  
   ##############################################################  
    
   #-----[ OPEN  ]------------------------------------------  
   includes/sessions.php 
    
   #-----[ FIND ]------------------------------------------  
      global $SID; 
    
      if ( !empty($SID) && !eregi('sid=', $url) ) 
    
   #-----[ REPLACE WITH ]------------------------------------------  
      global $SID, $HTTP_SERVER_VARS; 
    
 if ( !empty($SID) && !eregi('sid=', $url) && !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') && !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'slurp@inktomi.com;')) 
    
   #  
   #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------  
   #  
   # EoM
I get this error message :
Quote:
SQL-query :

includes / sessions.php GLOBAL $SID

MySQL said:


You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'includes/sessions.php
global $SID' at line 1
Any ideas?



__________________
"I can travel anywhere, except Cuba, and I will travel to New Zealand and walk the Lord of the Rings trail to Mordor and I will hike Mount Doom." ~Dwight K. Schrute
Reply With Quote
Advertisement
  #2  
Old Dec 12th, 04, 9:34 PM
Ogden2k's Avatar
Ogden2k
Photojournalist
Posts: 6,984
Status: Offline
shield_mod.giftechie.gif
 
From: Maine, USA
Joined: Dec 2002
Rep: Ogden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mindOgden2k has a brilliant tech mind
xbl.gifflickr.gif
I would think by now, in the latest version of phpBB, they would include this hack. They didn't back in 2.0.3. I'm glad we are away from that software now.

I'd have to see the original and changed file you edited.



__________________
Learn about the man behind the screen @ Ogden2k.net
Reply With Quote
  #3  
Old Dec 13th, 04, 3:07 AM
D Schrute's Avatar
D Schrute
Assistant Sensei
Posts: 1,249
Status: Offline
 
From: VA & NC
Joined: Aug 2004
Rep: D Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to beholdD Schrute is a splendid one to behold
Thanks James... I went in and manually changed the files... I was under the impression that I could run that text file in SQL, that is where I got the error.



__________________
"I can travel anywhere, except Cuba, and I will travel to New Zealand and walk the Lord of the Rings trail to Mordor and I will hike Mount Doom." ~Dwight K. Schrute
Reply With Quote
Reply

Tags
commands, google, mysql, php, spider


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mini-site for my 'Spider' film Nickweb HTML & Coding 12 Jun 4th, 08 12:23 AM
cmd commands locked? nameless Windows XP 10 Dec 31st, 07 5:00 AM
Spider Film (Cyberpunk Genre) Nickweb Video Authoring & Editing 9 Jul 25th, 06 12:34 PM
Need help with a mutated spider Nickweb Internet 17 May 30th, 06 12:58 PM


All times are GMT +1. The time now is 1:46 AM.