Link to home
Start Free TrialLog in
Avatar of sabecs
sabecs

asked on

PHP - how to bypass class?

Hi,
I have some secure image captcha boxes on my website forms that I would like to bypass if a vistor is using a mobile device but can't work out how to do it.

If I have a variable $display_layout = 'mobile', how can I bypass the secure image check?
Can I just set the check to true?

Thanks in advance for your feedback.

include_once 'securimage/securimage.php';
$securimage = new Securimage();

  if ($securimage->check($_POST['captcha_code']) == false) {
  // the code was incorrect
  // handle the error accordingly with your other error checking
  // or you can do something really basic like this
  
    header('Location: index.php?page=form_process_error');

  // die('The code you entered was incorrect. Please use your back button and try again.');

  }else {
 
//do something 

}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of StingRaY
StingRaY
Flag of Thailand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sabecs
sabecs

ASKER

Thanks StingRaY, too easy... I don't know why I did not think of that??
Welcome. :)