Jump to content

My New Contact Form

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
13 replies to this topic

#1
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Now I implemented a new contact us page for my business directory.

FindItGlobally.com - Business Directory >> Contact Us

Do you think that will stop spam bots?

Users have to select finditglobally.com from the selection box instead of "I am a bot"

do you think that will work? (Don't hesitate to full and send the email to test it.. just state you are from CodeCall)

Thanks!

#2
Ronin

Ronin

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 309 posts
No good. This is just a selection that any post/get script function could send to sendeail.php.

sendeail.php?antibotspam=FindItGlobally.com

IMO this doesn't help at all.

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Yeah but how can the bot know that?

#4
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Well it is definitely safer than not having it, but I don't think its more safe than the regular CAPTCHA.

#5
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Well I'm not much into PHP.. So I dont know how to implement CAPTCHA.

EDIT: I used your example here:
http://forum.codecal...-generator.html

It's a fixed number as It's complicated to read the random number (with my knowledge and because I'm using template pages etc...) anyways if I start getting spam I just change the $string :)

I think this is kinda better....I hope!

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Well I don't know how "normal" CAPTCHAS work but so far my PHP knowledge took em this far:

Generate a random captcha number
store it in a file as a variable
the email processor will read that value, send the email and the captcha value is deleted from that file.

If someone doesn't send the email successfully, no problems, next time someone will load the contact page it will replace the old value.

What you guys think? Maybe too complicated, but I have no ideas of how these are supposed to work.. so I think that this is quite good and secure.

What you think?

#7
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Well with PHP you generate a random number, and then using PHP you print that number on an image. Each time the page is loaded, a random number is generated so the image *usually* never has the same value. You could store that random number in a session variable, then just make sure the value in the input text box is the same value as the session variable when the form is submitted.

#8
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Well I did generate the random number but I have no idea about the session value (maybe you can help?) so instead I saved the value in another PHP file as a variable.

#9
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
You have to register a session and assign the random number to a session variable. You need to use a session variable sense regular variables are destroyed once the page is refreshed, using a session, you can pass variables from page to page [similar to using a hidden form field, but safer]

To register a session and create a session variable read here:
PHP: session_register - Manual

#10
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Thanks, I will read that and let you know how it goes :)

#11
devilsmaster

devilsmaster

    Newbie

  • Members
  • PipPip
  • 20 posts
I think sidewinder suggestions will surely help you.Using captcha is good option.
Please visit my blog on
IPOD Downloads

#12
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
The problem problem in here is.. I am calling the PHP file that generates the image from a TPL (Template) file.. so I can't read the $string variable generated in that PHP file into the contact.php so then I can forward it to sendemail.php to compare it.