PHP Classes

Lablnet Detect Ad Blockers PHP Library: Detect and block browsers using ad blockers

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 87 All time: 9,999 This week: 38Up
Version License PHP version Categories
lablnetadsdetector 1.0.0MIT/X Consortium ...5PHP 5, Content management, Business
Description 

Author

This package is OSSN (PHP Open Source Social Network) component (that can detect and block browsers using ad blockers.

It provides a PHP script that outputs a JavaScript library as part of the current page output to detect if the current browser uses an ad blocker extension.

The JavaScript library may output a message asking users to turn off the browser extension when ad blocking is detected.

Innovation Award
PHP Programming Innovation award nominee
June 2023
Number 2
Many sites place ads on their pages to earn more revenue while providing free access to site resources.

Some users who dislike seeing ads use ad-blocking extensions in their browsers to avoid showing ads.

When ads are blocked, the site owners that depend on advertising revenue to keep the sites running pay for all its costs and may be unable to control the sites open.

This package uses a JavaScript library to show messages to users that block ads to let them know that the advertising revenue is necessary to give them access to the site resources.

This way, conscient users may unblock ads for the sites that show these messages.

Manuel Lemos
Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 23
All time rank: 84310 in Pakistan Pakistan
Week rank: 44 Up1 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

define
('__LablnetAdsDetector__', ossn_route()->com . 'LablnetAdsDetector/');

// Init
function lablnet_init()
{
    if (!
ossn_isLoggedIn()) {
       
ossn_extend_view('ossn/page/footer', 'page/cdn');
    }
}

ossn_register_callback('ossn', 'init', 'lablnet_init');


Details

  • Detect AdBlockers and show message to disable it

  Files folder image Files (5)  
File Role Description
Files folder imageplugins (1 directory)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file ossn_com.php Example Example script
Accessible without login Plain text file ossn_com.xml Data Auxiliary data
Accessible without login Plain text file Readme.md Doc. Documentation

  Files folder image Files (5)  /  plugins  
File Role Description
Files folder imagedefault (1 directory)

  Files folder image Files (5)  /  plugins  /  default  
File Role Description
Files folder imagepage (1 file)

  Files folder image Files (5)  /  plugins  /  default  /  page  
File Role Description
  Accessible without login Plain text file cdn.php Aux. Auxiliary script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:87
This week:0
All time:9,999
This week:38Up