in reply to How can I determine whether a URI, hostname or IP address is to the local host machine?
When your script makes an HTTP request, include a header like:
User-Agent: MyScript
In your web server configuration (e.g. Apache .htaccess or httpd.conf) configure the server to block all requests from that user agent.
# This should work in .htaccess SetEnvIf User-Agent MyScript GoAway=1 Order allow,deny Allow from all Deny from env=GoAway
Easy peasy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I determine whether a URI, hostname or IP address is to the local host machine?
by dbooth (Novice) on Apr 29, 2014 at 21:42 UTC |