Title: Including this code for a bot trap
Last modified: August 30, 2016

---

# Including this code for a bot trap

 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/including-this-code-for-a-bot-trap/)
 * Hello,
    I have this code i would like to put on my website. The website says 
   to put it on the top of pages. Here is the website: [https://perishablepress.com/blackhole-bad-bots/](https://perishablepress.com/blackhole-bad-bots/)
   Here is the code: `<?php include($_SERVER['DOCUMENT_ROOT'] . "/blackhole/blackhole.
   php"); ?>` I have uploaded the unzipped folder to my Home directory. Placed the
   code in header.php only to get this very long error. EDIT: I have set Executable
   permissions for User, Group, and World. ERROR: Warning: include(/home2/ytadvise/
   public_html/blackhole/blackhole.php): failed to open stream: No such file or 
   directory in /home2/ytadvise/public_html/wp-content/themes/wpex-thoughts/header.
   php on line 13
 * Warning: include(): Failed opening ‘/home2/ytadvise/public_html/blackhole/blackhole.
   php’ for inclusion (include_path=’.:/opt/php54/lib/php’) in /home2/ytadvise/public_html/
   wp-content/themes/wpex-thoughts/header.php on line 13
 * Thanks for the help,
    Alex
 * Link to site: [http://ytadvisers.com](http://ytadvisers.com)

The topic ‘Including this code for a bot trap’ is closed to new replies.

## Tags

 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [tech55541](https://wordpress.org/support/users/tech55541/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/including-this-code-for-a-bot-trap/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
