greg Posted August 25, 2010 Share Posted August 25, 2010 Hi there, I'm running a php based website and I'm getting a lot of remotely posts to the forms. Is any way to prevent this using php or .htacces. Any tip o a site from where I should start? Thank you in advance. Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/ Share on other sites More sharing options...
fortnox007 Posted August 26, 2010 Share Posted August 26, 2010 If you mean robots that stumble upon your site and post, Captcha is what your looking for. If the violaters arent numerous you could try to block there ip's with .htaccess (google for: Order deny + .htaccess). But captcha nicer i think Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103796 Share on other sites More sharing options...
greg Posted August 26, 2010 Author Share Posted August 26, 2010 No exactly robots but some malicious intruders. Blocking ip is not a common sense because they use proxies. Some one please elaborate on this. Thanks Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103800 Share on other sites More sharing options...
trq Posted August 26, 2010 Share Posted August 26, 2010 Check the $_SERVER['HTTP_REFERER'] is your site. Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103832 Share on other sites More sharing options...
greg Posted August 26, 2010 Author Share Posted August 26, 2010 How I do that when the referring pages are dynamic? Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103970 Share on other sites More sharing options...
trq Posted August 26, 2010 Share Posted August 26, 2010 How I do that when the referring pages are dynamic? You are surely aware of the valid address of the form posting to your processing script? Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103971 Share on other sites More sharing options...
shlumph Posted August 26, 2010 Share Posted August 26, 2010 You could even just check the referring domain name Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103976 Share on other sites More sharing options...
AbraCadaver Posted August 26, 2010 Share Posted August 26, 2010 Create a unique token on your form page, stick it in the session, add it as a hidden input to your form. When submitted check that the hidden form field token matches the session token. There are plenty of examples out there. Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1103997 Share on other sites More sharing options...
greg Posted August 26, 2010 Author Share Posted August 26, 2010 Thank you!!!!! Like I said, jkaiosdaxcss Link to comment https://forums.phpfreaks.com/topic/211739-how-can-i-block-remote-post-to-a-form/#findComment-1104154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.