A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 132

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 290

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 164

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 233

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 313

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 354

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 284

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 291

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 306

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 318

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 319

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 377

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Cache::$apc is deprecated

Filename: libraries/Driver.php

Line Number: 188

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/models/DefaultModel.php
Line: 8
Function: driver

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Cache::$file is deprecated

Filename: libraries/Driver.php

Line Number: 188

Backtrace:

File: /home/palugada/domains/envato.palugada.top/public_html/application/models/DefaultModel.php
Line: 8
Function: driver

File: /home/palugada/domains/envato.palugada.top/public_html/application/core/MY_Controller.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/application/controllers/Codecanyon.php
Line: 6
Function: __construct

File: /home/palugada/domains/envato.palugada.top/public_html/index.php
Line: 315
Function: require_once

FATS: Force Adblock To Stop | codecanyon

Note

This is the PHP Script version of FATS: Force Adblock To Stop Wordpress Plugin:
http://codecanyon.net/item/fats-force-adblock-to-stop-wordpress-plugin/7379761


Overview

Easily hide partial or all of your premium content from your users that using AdBlock or Adblocking software. Just add 4 lines of code to your page and it will automatically hide your content without any trouble.

Features

  • Your premium content will be hidden until user deactivate AdBlock.
  • 3 methods to detect adblock.
  • Support for Adsense’s asynchronous and synchronous blocking detection.
  • Support for other ads network and self hosted ads blocking detection.
  • Content will stay hidden if user deactivate cookie or javascript.
  • Hide all or partial content from your page.
  • Hide anything you want in your PHP file.
  • Your content won’t show in Source View.
  • Show your message in JQuery Popup, Javascript Alert or Inline text.
  • Autoredirect page after showing message.
  • Cross browser detection.
  • Easy to setup, less than 5 minutes to setup.
  • Just add 4 lines of code to your page and you’re set.
  • Uses cookies to detect deactivate AdBlock.
  • Highly customizable message and CSS.

Limitation

My script may not work best inside cached pages. If you are using cache system (plugin, CDN, cloudflare, etc), you may have to reduce the cached time on your pages to under 1 minutes. The lower, the better. But again, my script wasn’t designed to support caching. Setting the cache’s update interval to the minimum may give you the desired result but it will still give false detection for visitors that requesting a same post at the same time. Hopefully with many content that you may have, the false detection ratio is not noticeable.

But in near future I will create another version of my script that support cached system.

Latest Updates

version 1.6 – Feb 24, 2014
  • fixed bug in Cookies with subdirectory
version 1.5 – Jan 5, 2014
  • added auto redirect page after showing message
  • documentation updated
version 1.4 – Jan 1, 2014
  • added jquery popup message option
  • added javascript popup message option
  • documentation updated
version 1.3 – Dec 29, 2013
  • added new method to detect adblock
  • added support for adsense’s asynchronous and synchronous method
  • documentation updated
version 1.2 – Dec 27, 2013
  • added disabled cookie detection in user’s browser
  • added disabled javascript detection in user’s browser
  • documentation updated
version 1.1 – Dec 25, 2013
  • fix a XSS vulnerability
  • rewrite documentation
version 1 – Dec 24, 2013
  • initial release

Requirements

  • PHP 5.xx (older version may work but they have not been tested).
  • Basic understanding on how to write in PHP.

Inserting FAtS To Your Code

<?php include "fats_core.php"; ?>
<html>
<head>
<?php write_JS($fats_config ); ?>
</head>
<body>
Your regular content

<?php if (is_Unlocked($fats_config)){ // START HIDDEN CONTENT ?>

<p>Your premium content</p>

<?php } ///////////////////////////// STOP HIDDEN CONTENT ?>

Your regular content
</body>
</html>

Looking for something else?

I have created a few items in CodeCanyon that you may want to take a look:



If you have an idea for a website/plugin or you want something to be made, don’t hesitate to contact me.

 

Flag Counter

You May Also Like