Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-17-2008, 10:33 AM   #1
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
I couldn't figure out why google wasn't indexing my site...then...

So I checked and double checked my code and found that I had some code that checked for a cookie to show adult content. This was supposed to check if the browser was Google and let Google see everything even if the "over 18 button" was not clicked.

But the code had a bug, and was refusing to show Google any HTML at all since the Google crawler had not clicked on the "over 18 button" and set the cookie. My override code, to check if Google was coming had a bug.

My heart sank when I saw this. Months of Google crawling and never indexing wasted.
__________________
www.gimmiegirlproductions.com
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 10:38 AM   #2
TheStout
Confirmed User
 
TheStout's Avatar
 
Join Date: Jul 2007
Posts: 2,089
What was the code and how did it get there?
TheStout is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 10:40 AM   #3
pussyserver - BANNED FOR LIFE
So Fucking Banned
 
Join Date: Oct 2005
Location: I convert perverts like catholic church!
Posts: 5,133
Quote:
Originally Posted by camperjohn64 View Post
So I checked and double checked my code and found that I had some code that checked for a cookie to show adult content. This was supposed to check if the browser was Google and let Google see everything even if the "over 18 button" was not clicked.

But the code had a bug, and was refusing to show Google any HTML at all since the Google crawler had not clicked on the "over 18 button" and set the cookie. My override code, to check if Google was coming had a bug.

My heart sank when I saw this. Months of Google crawling and never indexing wasted.
Can you please post the exact code that caused the error thanks
pussyserver - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-17-2008, 10:43 AM   #4
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
I put it there!

Code:
// If its a crawler looking for content
$agentlist = array("Web Indexer","crawlerinfo","TurnitinBot","Mediapartners-Google","Googlebot","genieBot","YahooYSMcm","picsearch","[email protected]","Slurp",
				               "Yahoo!","Sidewinder","Scooter","InfoSeek","Ultraseek","vscooter","Gulliver","Crawler",
				               "Baiduspider","RealWebCrawler","Gigabot","Ask Jeeves","Dead Link Checker","msnbot",
				               "Robot","knowledge agent","ArchitextSpider","Offline Explorer");

if (in_array ($_SERVER['HTTP_USER_AGENT'],$agentlist))
{
    // When Google crawls, Google gets everything
    $a = USER_CATEGORY_SFW | USER_CATEGORY_STRAIGHT | USER_CATEGORY_GAY; 
} 

if (cookie_set('ov18'))
{
    // If the user has previously clicked the over 18 button, show him everything
    $a = USER_CATEGORY_SFW | USER_CATEGORY_STRAIGHT | USER_CATEGORY_GAY;
}
else
{
    // Show users mainstream content as they may be at work
    $a = USER_CATEGORY_SFW;
}
Do you see the bug?

Code:
if (in_array ($_SERVER['HTTP_USER_AGENT'],$agentlist))
{
} 

if (cookie_set('ov18'))
{
}
else
{
}

// Here is the correct code, with the correct else statement

if (in_array ($_SERVER['HTTP_USER_AGENT'],$agentlist))
{
} 
// !!!!!!!!!!!!!
else if (cookie_set('ov18'))
{
}
else
{
}
I don't need the bug fixed, I was just so disappointed when I saw it!! The second set of if/else was overrriding anything to do with the browser check.
__________________
www.gimmiegirlproductions.com

Last edited by camperjohn64; 10-17-2008 at 10:44 AM..
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.