CodeIgniter Forums

Full Version: My new work - An anti-scriping library.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just have completed the document, can't wait for share with you. Any feedback, feature request are welcome. 



Demo: (Just refresh many times at a short period time to see how it work.)

Implement this in your Codeigniter 3:

in MY_Controller

public function protection()
    $db = [
        'host'    => $this->db->hostname,
        'dbname'  => $this->db->database,
        'user'    => $this->db->username,
        'pass'    => $this->db->password,
        'charset' => 'utf8',

    $pdoInstance = new \PDO(
        'mysql:host=' . $db['host'] . ';dbname=' . $db['dbname'] . ';charset=' . $db['charset'],

    $shieldon = new \Shieldon\Shieldon();
    $shieldon->setDriver(new \Shieldon\Driver\MysqlDriver($pdoInstance));
    $shieldon->setComponent(new \Shieldon\Component\Ip());
    $shieldon->setComponent(new \Shieldon\Component\Robot());

    $shieldon->setCaptcha(new \Shieldon\Captcha\ImageCaptcha(['word_length' => 4]));

    // Start protecting your website!
    $result = $shieldon->run();
    if ($result !== $shieldon::RESPONSE_ALLOW) {
        if ($shieldon->captchaResponse()) {
            // Unban current session.
        // Output the result page with HTTP status code 200.


PHP Code:

In any Controller, you want to protect the page.
Interesting project!

Do you exclude the "good" bots ?
Like the search engines crawler ?