Welcome Guest, Not a member yet? Register   Sign In
My new work - An anti-scriping library.

(This post was last modified: 05-28-2019, 02:50 AM by allenlee.)

I just have completed the document, can't wait for share with you. Any feedback, feature request are welcome. 

Git: https://github.com/terrylinooo/shieldon

Document: https://shield-on-php.github.io/

Demo: https://terryl.in (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.
Personal blog: https://terryl.in
My personal project is called Dictpedia is currently using Codeigniter 3, welcome.

Interesting project!

Do you exclude the "good" bots ?
Like the search engines crawler ?
remote software developer jobs aggregated in one place
*No SEO spam, per forum policy*

Theme © iAndrew 2016 - Forum software by © MyBB