Free basic cloaking + shuffling script

SERGEY

Newbie
Joined
Mar 8, 2007
Messages
2
Reaction score
2
Some moron reported our sites, so we will stop using it for a
while and make improved script.

It's not perfect, it's just a nice small script to begin
with and extend it as you need

It checks if user-agent contains word "google", or
if reverse-domain lookup contains "google".

If yes, it inserts randomly keywords at every visit to make site
appear "often updated" for Googlebot

Some suggestions for improvement:
- don't overuse it too much
- extend it (i.e. sentence-like)

You need PHP5 for stripos!

If you use PHP4, please replace it by equivalent expression
to convert string to uppercase and then compare it against
uppercase value. Any PHP-savvy person can help you with it

Code:
<?
error_reporting(0);
if((isset($_SERVER["HTTP_USER_AGENT"])&&is_numeric(stripos($_SERVER["HTTP_USER_AGENT"], "Google")))||
$_SERVER["QUERY_STRING"]=="google"||(isset($_SERVER["REMOTE_HOST"])&&stripos($_SERVER["REMOTE_HOST"],"google")))
{
$keywords = array("keywords","go","into","this","array");
srand((float)microtime()*1000000);
shuffle($keywords);
for($y=0;$y<20;$y++)
{
srand((float)microtime() * 1000000);
shuffle($keywords);
for($x=0;$x<count($keywords);$x++)
{
echo $keywords[$x];
echo "   ";
}
}

}
 ?>
 
Nice little script you have there. :) Did you know the person that reported you? Or was it some random jerk that found out you were cloaking?
 
Are you supposed to have this code in each of the cloaked pages? or is it possible to have it at one place (server side) and make it work for all the cloaked pages?
 
You can place the code in it's own file (eg. include.php) and then include it in your other files. Ah, the joys of OOP :).
 
nice script, but i have one question

maybe anybody could tell me how to modify it that it could redirect user (if it is not a google) to other page?

thank you
 
You can place the code in it's own file (eg. include.php) and then include it in your other files. Ah, the joys of OOP :).

My question is this. Do we need to OOP it?

Can the php in page be spidered? I was under the impression that it was server side code that could not be seen... until, I read this thread and remembered a programmer telling me he wanted to use perl rather then PHP for anonymity reasons.

Whats the scoop? Thx! :)
 
Are you sure someone reported you? I think it's great you're sharing the script, but that type of cloaking would be very easy to detect for several reasons:
1. It would be easy for a competitor to spoof their user agent and see your cloaked page. That's why IP checking is usually preferred.
2. Having content that changes on every single visit is suspicious. When spiders visit the same page to check for new content and it's completely different every time, they may suspect something.
3. Stuffing a page with solid keywords is very spammy and suspicious looking. I think the ideal keyword density is between 3%-10% and that script is basically creating pages of 100% keyword density. Even if the script is just used as an include, the keywords work better if they're peppered throughout the page and not in an obvious clump.

That's just my 2 cents from experience. I was also planning on sharing my php cloaking script as soon as I finish cleaning it up. It addresses all of these issues with IP checking, caching and configurable keyword density per page(plus lots more).
 
I have similar script (WP plugin), that appends text to duplicate articles to prevent them from being hit by the duplicate content filters. I'm unable to post the link (less than 15 posts), but look for the article about 'Avoiding Duplicate Content Penalties The Plugin' on my blog (link in sig.)
 
Very good code work. Interesting the way people will come into these style of sites and forums when no one is looking and then turn on you for doing the same techniues they are using... " HAIL HYPOCRYTICAL MORONS!!! "

Good code work, did you do this yourself or outsource to a programmer?
 
Back
Top