Welcome to WebmasterWorld Guest from 54.157.222.62

Forum Moderators: open

Message Too Old, No Replies

Need advice on writing my own cloaking script

What language and database vs flat file

   
2:29 am on Dec 15, 2003 (gmt 0)

10+ Year Member



I am working on my writing my own cloaking script and am trying to work out the best way to do it with the limited skills I have. Basically, I was planning to use the Fantomaster spider list for IPs, and use a short inline PHP cloaking script included before the opening <html> tag of every page of my shadow domains. The script would check the list of spider IPs and either redirect to my main sales domain if it is an ordinary surfer, or serve up the spider food page as normal if the visitor is a spider.

Is this an efficient way of cloaking? I have been wondering, since the Fantomaster list looks to be quite large, if there would be any advantage in parsing the IP list from a MySQL database as opposed to a flat text file, which was my original plan. Apart from doing some basic tutorials, I currently know very little about databases, but am sure that I can learn enough to be able to use MySQL if there was going to be a definite speed advantage to doing so.

Also, is PHP even the right language to be using? I notice that a lot of the commercially available cloaking scripts are written in Perl - what is the reason for that, and is PHP a realistic alternative?

The other thing that occured to me was to just use mod_rewrite and .htaccess in every domain with the spider IPs - is that a viable (or better) alternative to a separate cloaking script, and will it be faster or slower?

Any advice or suggestions would be much appreciated. :)

7:54 pm on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP is a great language for both cloaking and for accessing MySQL databases. A MySQL database would be better than a flatfile for accessing search engine IP addresses.

My personal opinion about Perl and cloaking is that the codebase for most the the commercial cloaking scripts was written before PHP became popular, and just haven't been ported to PHP.

The other thing that occured to me was to just use mod_rewrite and .htaccess in every domain with the spider IPs - is that a viable (or better) alternative to a separate cloaking script, and will it be faster or slower?

This would work for a very simple cloaking script, but the Fantomaster's IP list is pretty long and running through such a long list of IPs for every page access would use a lot of server resources. A MySQL query would be more efficient.

Dan

4:48 am on Dec 18, 2003 (gmt 0)

10+ Year Member



Thanks very much for your answer, just what I was hoping for. PHP + MySQL it is. :)