Imad Posted March 31, 2008 Share Posted March 31, 2008 Hi guys, is their a way to disallow bots using php instead of robots.txt? Regards. Link to comment https://forums.phpfreaks.com/topic/98834-disallowing-bots-with-php/ Share on other sites More sharing options...
BlueSkyIS Posted March 31, 2008 Share Posted March 31, 2008 yes, sort of. check the user agent. but if they don't send user agent, it won't work. if you can find a decent list of robot IPs, you could exclude those ips. Link to comment https://forums.phpfreaks.com/topic/98834-disallowing-bots-with-php/#findComment-505738 Share on other sites More sharing options...
maexus Posted March 31, 2008 Share Posted March 31, 2008 The user agent isn't reliable. If a bot doesn't want to follow robots.txt, it's likely to spoof the user agent Link to comment https://forums.phpfreaks.com/topic/98834-disallowing-bots-with-php/#findComment-505816 Share on other sites More sharing options...
Imad Posted March 31, 2008 Author Share Posted March 31, 2008 Ok, thanks for the info guys. Link to comment https://forums.phpfreaks.com/topic/98834-disallowing-bots-with-php/#findComment-505835 Share on other sites More sharing options...
roopurt18 Posted March 31, 2008 Share Posted March 31, 2008 Are you trying to combat spam on your site? Link to comment https://forums.phpfreaks.com/topic/98834-disallowing-bots-with-php/#findComment-505848 Share on other sites More sharing options...
Imad Posted March 31, 2008 Author Share Posted March 31, 2008 Are you trying to combat spam on your site? Nope, just trying to figure out a way to manage everything through php. Link to comment https://forums.phpfreaks.com/topic/98834-disallowing-bots-with-php/#findComment-505874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.