|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| iWEBTOOL Moderator Contributor Join Date: Aug 2006 Location: Hungary
Posts: 1,855
![]() ![]() ![]() ![]() ![]() | I usually support th UKWW with my programming solutions, but this time i will post it here. Last week a guy asked me if i could develop some protection against bad robots. Previously i enhanced a google proxy hack defending script and another one which is suiable to make your robots.txt file only for the robots, which are authorized to check it so he was very enthusiastic. Some days ago i started a little survey on topic and found a lot of htaccess rule, where certain hosts are rejected via .htaccess, but they were not automatic, so the challange was given. Basically i used this resource to create this automatic solution. 1. Open your robots.txt and insert this line into it Code:
Code:
![]() 2. Create the folder on your hosting space which is specified in the robots.txt file, in my example this is root/core and upload an index.php file with the following content. PHP Code: 3. As you may see i defined a $logfile where the IP adresses will be collected hence we need to upload to the same (core) folder a blank txt file called bannolnilog.txt (644 attributum). 4. We need to upload an other php file which will check if the visitor is bannished whenever a page is requested, i named this file validator.php and its content is the following. PHP Code: 5. You need to insert this line into the very front of your script header PHP Code: I warrant nothing, but works very well ![]() You may truncate the logfile deleting the collected IPs.
__________________ █ Time may come when you will need an excellent eCommerce shopping cart software █ free seo related web directory mérlegek Free shopping cart |
| | |
|
| |||||||
| | #2 |
| iWEBTOOL Moderator Contributor Join Date: Oct 2006
Posts: 2,172
![]() ![]() ![]() ![]() ![]() | Great post Bagi, rep given. This is the most usefull thing I have seen posted here for ages. |
| | |
| | #3 |
| iWEBTOOL Moderator Contributor Join Date: Aug 2006 Location: Hungary
Posts: 1,855
![]() ![]() ![]() ![]() ![]() | I'm glad that you like it Midi, I have some posted already, but have a plan about creating an integrated security script system, but i have no idea when it will be ready, i guess in the next 6 months ![]()
__________________ █ Time may come when you will need an excellent eCommerce shopping cart software █ free seo related web directory mérlegek Free shopping cart |
| | |
| | #4 |
| iWEBTOOL Moderator Contributor Join Date: Oct 2006
Posts: 2,172
![]() ![]() ![]() ![]() ![]() | Bagi, would you mind if I added this to the Tutorials section at TriPHP http://www.triphp.com/articles.php?cat_id=3 If so what link would you like to go with it? |
| | |
| | #5 |
| iWEBTOOL Moderator Contributor Join Date: Aug 2006 Location: Hungary
Posts: 1,855
![]() ![]() ![]() ![]() ![]() | Midi, feel free to add this post to the tutorial section. I think this time i need no link ![]()
__________________ █ Time may come when you will need an excellent eCommerce shopping cart software █ free seo related web directory mérlegek Free shopping cart |
| | |
| | #6 |
| iWEBTOOL Moderator Contributor Join Date: Oct 2006
Posts: 2,172
![]() ![]() ![]() ![]() ![]() | Great Bagi, thanks. That will be a great addition there |
| | |
| | #7 |
| Smurf | thx nice tut.
__________________ Samari.org <----- webmasters forum comming soon... crazy-coding@hotmail.co.uk im a php coder msg me for jobs. |
| | |
| | #8 |
| Junior Member Join Date: Dec 2007 Location: India
Posts: 52
![]() | This is cool, even though it adds a little over head to each of the file, I think it is good , than get over content stealed :-) We just need to make sure that the IP file does not get too big that users fell that our site pages are loading slowly.
__________________ UrStop.com India's Property and Rental listings Search Tool UrStop.com India's Property and Rental listings Search Tool |
| | |
| | #9 |
| iWEBTOOL Moderator Contributor Join Date: Aug 2006 Location: Hungary
Posts: 1,855
![]() ![]() ![]() ![]() ![]() | Your suggestion is 100% justified urstop: When finalizing the future release of the script i will consider the auto truncate option after x day to easy the script load. The new version is already completed with an url checker module which may help to log and ban the IP adresses of those visitros, who tries to attack the sql database via injection techniques.
__________________ █ Time may come when you will need an excellent eCommerce shopping cart software █ free seo related web directory mérlegek Free shopping cart |
| | |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help So Bad... :( | Evan | Help and Support | 2 | 12-27-2007 02:59 AM |
| Even BIG Sites Steal Your Work: How Iwebtool steals from Directory Kit | xefus | Directories | 2 | 10-27-2007 03:30 AM |
| Adding a robots.txt page, some questions | jfranktoo | Search Engine Optimization (SEO) | 3 | 10-09-2007 01:14 PM |
| Not bad, I think | cross_on | Introduce yourself | 6 | 05-27-2007 01:08 PM |
| Is too much really bad? | tag909 | Discuss iWEBTOOL | 10 | 09-30-2006 12:04 AM |