Hi There,
I´ve been using a spider-detection script for over a year now. Goal of this script is to check by user-agent whether or not a ´visitor´ is a spider, or a plain visitor. If it´s a spider, it inserts a .txt file using php include, containing optimized html code.
This all works fine if every page you use the script on uses the same txt file. But we´re now developing a dynamic website. Default.php and product_info.php are used for almost every page on the site. But we want to have different txt files included based on the url (PHP SELF).
In example, a different txt file has to be included for these files:
- shop/default.php?cPath=1
- shop/default.php?cPath=21
- shop/default.php?cPath=22
- shop/default.php?cPath=23
- shop/default.php?cPath=24
Now the code has to be included in default.php. When the full url is cPath=1, .txt file path1 has to be included, when the url is cPath=21, .txt file path21 should be used, etc.
Does anyone here know how to pull this off?
Thanks in advance