PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-06-16 (11 months ago) RSS 2.0 feedNot enough user ratingsTotal: 86 All time: 10,005 This week: 455Up
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: 22
All time rank: 84411 in Pakistan Pakistan
Week rank: 307 Up6 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  
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  /  plugins  
File Role Description
Files folder imagedefault (1 directory)

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

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:10,005
This week:455Up