ballhogjoni Posted October 23, 2007 Share Posted October 23, 2007 I am getting traffic from india and they just spam the crap out of me, asking for link exchanges and stuff. I also they just use up my bandwidth because my product is only for canada and the USA. Can someone point me in the right direction on where to start? Link to comment https://forums.phpfreaks.com/topic/74453-can-you-hide-your-website-from-an-ip/ Share on other sites More sharing options...
only one Posted October 23, 2007 Share Posted October 23, 2007 Tou can try track the IP, then paste this at the top of your page: <?php if($_SERVER['REMOTE_ADDR'] == 'their IP') { die; } ?> Link to comment https://forums.phpfreaks.com/topic/74453-can-you-hide-your-website-from-an-ip/#findComment-376177 Share on other sites More sharing options...
Ninjakreborn Posted October 23, 2007 Share Posted October 23, 2007 You can try the ip and ban it as needed. Or you can use filters. Not sure what it was (ask redbullmarky (pm) he had a great system. However I was using something like an htaccess file that filtered out a lot of "known" spamers, but redbullmarky told me he used another system that worked real well. Link to comment https://forums.phpfreaks.com/topic/74453-can-you-hide-your-website-from-an-ip/#findComment-376182 Share on other sites More sharing options...
ballhogjoni Posted October 23, 2007 Author Share Posted October 23, 2007 For right now is there just a way to echo ip address from the USA? This is what I would like to do: if ($_SERVER['REMOTE_ADDR'] == 'USA IP') { execute code }else{ You may not view this site! } Link to comment https://forums.phpfreaks.com/topic/74453-can-you-hide-your-website-from-an-ip/#findComment-376217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.