fgoldberg Posted January 3, 2008 Share Posted January 3, 2008 Can anyone point me to some code I can use for "Contact Us" functionality that includes anti-spam support? I am a novice user. Right now I'm using "mailto" and getting bombarded with spam. Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/ Share on other sites More sharing options...
teng84 Posted January 3, 2008 Share Posted January 3, 2008 and how do you wan to prevent spam!!! theres so many ways but they are not even 50% usefull Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428922 Share on other sites More sharing options...
dewey_witt Posted January 3, 2008 Share Posted January 3, 2008 Use captcha capasha..... dang I NEVER can spell this word right. Its the box with the letters and numbers in it. Make them type in the words to the capasha image. As long as the image has alot of background noise to make it dificult for bots to pull out the numerals and letters you should be a lil effective. Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428924 Share on other sites More sharing options...
awpti Posted January 3, 2008 Share Posted January 3, 2008 My method of 'captcha' is to create an input field hidden via <code> <div style="display:none"> <input type="text" name="email" /> </div> If "email" has a value, you know it's a bot. Bots can't tell if a field is hidden or not. Just name your actual "email" field something else. Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428930 Share on other sites More sharing options...
teng84 Posted January 3, 2008 Share Posted January 3, 2008 those captcha ting is not useful i believe.. maybe you can try this allow the user to email you once in one day .. but this will only work for members of the site.. track ip address and allow that ip to send once.(not accurate for dial up connection) etc.. or use cookie or session that will determine how many times they sent an email Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428932 Share on other sites More sharing options...
dewey_witt Posted January 3, 2008 Share Posted January 3, 2008 Not true in all cases. I've seen bots that decifer hidden feilds. Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428933 Share on other sites More sharing options...
dewey_witt Posted January 3, 2008 Share Posted January 3, 2008 I Like the cookie and session ideal also. It would sure help to cookie the lil biggers respocible set to live till the end of time. that may slow it down a bit but all they have to do to destroy the session or cookie is run windowss washer on windows.... and crankdestroy on linux. Another thing that might help is to break away from naming your inputs traditionaly. I know this may be a pain for some developer down the road.......... but if the spamming is that big of an issues its something to try. Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428934 Share on other sites More sharing options...
fgoldberg Posted January 3, 2008 Author Share Posted January 3, 2008 OK, everybody. Just about anything would be an improvement over what I'm using, so maybe a relatively simple step up would do. Also, please remember that I am not a techie, so I need some actual code. I googled captcha and there appear to be lots of versions out there. Can anyone recommend one they are using? Really, really, a novice! Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-428941 Share on other sites More sharing options...
awpti Posted January 3, 2008 Share Posted January 3, 2008 Easiest captcha in the world? What is 10+2 <input type="text" name="cap_answer" /> Code: <?php if($_POST['cap_answer'] != "12") { // Bad bot, go away and/or redirect to form. } else { // Process the form } ?> Far from foolproof, but again, it works. You can use many different methods or just pick up one of the many captcha libraries around and use them. On a side note, I've yet to have a bot manage to actually spam my form with the hidden (via the style of the element it's nested int) input field. If you actually hide the input field itself, I can see that being easier to decypher. In the end, an image captcha is the most generally secure method of bot-avoidance. Pick one and run with it. Quote Link to comment https://forums.phpfreaks.com/topic/84229-help-with-contact-us-including-anti-spam/#findComment-429011 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.