Jump to content

include hidden data in post to php page from asp.net/ post tossing


im_still_learning

Recommended Posts

I have a hidden field spam bots are finding. Is there a way to include this field when posting from an asp.net form to a php page, maintaining the secrecy of the value?I know i can use the postbackurl property of an asp button, but i have not had success with including the hidden field in the post.I received a recommendation to, post the form sans hidden field to intermediate site, receive the post and append the hidden field, then post to final destination, but I'm not this good at playing catch with posts and changing the receiver.

Link to comment
Share on other sites

I assume you don't want to send/process the page if it sent by a spam bot? I use a simple trick using the spam bots greediness against them. Basically a spam bot will fill in ANY input field it can find. I always place a hidden field that I DON'T want filled in. Because it is hidden a real user would not be able to fill it in so I know that if I receive the form with this field filled in that it came from a spam bot.HTML

<form ...><!--all your regular fields--><input type="text" name="honeypot" id="honeypot" style="display:none"/></form>

PHP

if(strlen($_POST['honeypot']) == 0) {  //process the form}else {  //handle spam as you see fit}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...