SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 42 of 42
  1. #26
    SitePoint Enthusiast abdussamad's Avatar
    Join Date
    May 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually you're probably better off using nested associative arrays if you want to store q's and answers:

    Code:
    $muckabout=array();
    
    $muckabout[]=array("question"=>"How many Chinese in China?", "answer"=>"too many");
    
    $muckabout[]=array("question"=>"How many engineers does it take to screw in a light bulb?", "answer"=>"way too many");
    And no the above the are not good questions for captcha

  2. #27
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Cups
    I wouldn't consider those two questions very good. A lot of people wouldn't know how much a dozen is, and 30 and three would be said to be integers or natural numbers. I'm being nit-picky here, but it's important to bear this in mind. Likewise, a simple question such as 'which month is the longest' is equally ambiguous. October has the most hours (due to daylight savings time), but September has the most letters, and any child will tell you that December is the longest month in the year by far.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  3. #28
    SitePoint Wizard tgavin's Avatar
    Join Date
    Feb 2003
    Location
    FL
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I like the reverse captcha method, where you add an additional text field and set it to display:none.

    Basically, a bot will try to answer all form fields, so if this field is filled don't process the form. Not one spam email has gotten through with this on any of my forms.

    PHP Code:
    <?php
    if($_POST['field'] == '') {
        
    // process the form
    }
    ?>
    <input type="text" name="field" style="display:none">

  4. #29
    SitePoint Evangelist
    Join Date
    Jan 2002
    Location
    Scotland, UK
    Posts
    530
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Been using the questions and answers things on my forum for years (Textual Confirmation).

    Things like:

    Type the year
    What do you freeze to make ice
    If you had 4 apples and ate 2 of them, how many would you have left
    Which is not a computer/IT company out of Google, Apple, Microsoft and Ford
    What colour do you get when you mix blue and yellow

    ...

  5. #30
    SitePoint Addict bimalpoudel's Avatar
    Join Date
    Feb 2009
    Location
    Kathmandu, Nepal
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #tgavin I love to write the name as email, with not inline style. So, many spammers would fill up this form, if they try to automate.
    Code:
    <input type="text" name="email" class="hide">
    Sometimes, though not seen in practice:
    Give the answers within the form.
    Like, what is 2+3 = ? And, make the user click on 5 (correct answer) out of 2, 5, 7, 1 (in the options)

    Do not accept the form, if the header is not valid (the form should be posted online, in your website only).

    Do not accept the form if submitting a too old form (loaded once and saved the html for offline use, etc, or too delayed to submit the form)

    And this is what I practice myself:
    Using the unobtrusive javascript, I answer the captcha within the forms myself, in a hidden way. No one sees my forms include an embeded/valid captchas. Though this is not always a solution, it keeps far away from the automated spammers.
    Bimal Poudel @ Sanjaal Framework over Smarty Template Engine
    ASKING INTERESTING QUESTIONS ON SITEPOINT FOURM

    Hire for coding support - PHP/MySQL

  6. #31
    SitePoint Wizard tgavin's Avatar
    Join Date
    Feb 2003
    Location
    FL
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bimalpoudel View Post
    #tgavin I love to write the name as email, with not inline style. So, many spammers would fill up this form, if they try to automate.
    Code:
    <input type="text" name="email" class="hide">
    Yeah, I generally use 'company' as the field name.

    What I like about this method is that you're not forcing your user to do more work than is necessary. Making the user jump through hoops to give you their information doesn't make sense to me. I'd rather do all of the hard work (no matter what that may be) than make my user (read: potential customer) do it.

  7. #32
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Off Topic:

    Quote Originally Posted by Rikki View Post
    Been using the questions and answers things on my forum for years (Textual Confirmation).
    Easy peasy:

    Type the year: year
    What do you freeze to make ice: beer
    If you had 4 apples and ate 2 of them, how many would you have left: half as many
    Which is not a computer/IT company out of Google, Apple, Microsoft and Ford: Microsoft
    What colour do you get when you mix blue and yellow: blellow

  8. #33
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code which is shown is absolutely okay. It can help me and others.

  9. #34
    SitePoint Addict
    Join Date
    Mar 2010
    Location
    UK
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tgavin View Post
    I like the reverse captcha method, where you add an additional text field and set it to display:none.

    Basically, a bot will try to answer all form fields, so if this field is filled don't process the form. Not one spam email has gotten through with this on any of my forms.

    PHP Code:
    <?php
    if($_POST['field'] == '') {
        
    // process the form
    }
    ?>
    <input type="text" name="field" style="display:none">
    You know that a number of ATs ignore display:none if it's applied to form elements, right? So you still need an instructive label for them and no-CSS viewers.

  10. #35
    SitePoint Wizard tgavin's Avatar
    Join Date
    Feb 2003
    Location
    FL
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adh32 View Post
    You know that a number of ATs ignore display:none if it's applied to form elements, right? So you still need an instructive label for them and no-CSS viewers.
    No, I didn't.

    I normally apply CSS to the containing div. Sometimes I try to over-simplify things on the forums so the example doesn't get lost, and then give bad advice. I should change that behavior.

    Thanks for the heads up.

  11. #36
    SitePoint Evangelist
    Join Date
    Jan 2002
    Location
    Scotland, UK
    Posts
    530
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Off Topic:



    Easy peasy:

    Type the year: year
    What do you freeze to make ice: beer
    If you had 4 apples and ate 2 of them, how many would you have left: half as many
    Which is not a computer/IT company out of Google, Apple, Microsoft and Ford: Microsoft
    What colour do you get when you mix blue and yellow: blellow
    Yup, it weeds out the dickweeds nicely too

  12. #37
    SitePoint Member jaysonharmons's Avatar
    Join Date
    Aug 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Better yet, does anyone know of a WP plugin for this? I'd also rather have people answer a question. I have also seen graphic ones lately where you have to slide a carrot to a rabbit for example when it asks which food does this animal eat? Thought that was cool!

  13. #38
    SitePoint Addict
    Join Date
    Mar 2010
    Location
    UK
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...Thought that was cool!
    It might be if you can (a) see it and (b) use a pointing device.

  14. #39
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hats off to the reverse captcha method. Under the hood, less work and less fuss for all. Many times the simplest solution is the most efficient. Gonna try it myself and see how it works out.

    Thank you for mentioning it here

  15. #40
    Non-Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CAPACHA is so difficult to verify but most secure way....
    i have most of problem with CAPACHA verification code..thats effect my submission speed in SEO..

  16. #41
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Search engines do not index some common words (such as "or", "and", "when", and "in") within the webpage. What are these common words called?

  17. #42
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MarPlo View Post
    Hy,
    In your contact form add an input field:
    HTML Code:
    What color is the sky?
    Answer:  <input type="text" name="ans" />
    Then, in the php file that gets data form, add:
    PHP Code:
    if(isset($_POST['ans']) && $_POST['ans']!='blue') exit('Wrong answer'); 
    Nice method, although you should sanitise the user's post data like so:

    In your contact form add an input field:
    HTML Code:
    What color is the sky?
    Answer:  <input type="text" name="ans" />
    Then, in the php file that gets data form, add:

    PHP Code:
     //simple captcha
      
    $_POST['ans'] = mysql_real_escape_string(strip_tags($_POST['ans'])); //clean post data
     
    if(isset($_POST['ans']) && $_POST['ans']!='blue') exit('Wrong answer'); 
     
    //simple captcha 


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •