Link to home
Start Free TrialLog in
Avatar of sabecs

asked on

PHP - how to bypass class?

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

Avatar of StingRaY
Flag of Thailand image

Link to home
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


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