PHP Library & Anti Ad-block code

PopCash Team
PopCash
Published in
5 min readJun 23, 2023

1. What is the PopCash anti-ad-block feature?

The anti-ad-block is a feature JavaScript code to use for the ads to be displayed even though the visitors have Adblock enabled.

Our Anti Adblock javascript is dynamic and unique (each time you refresh the page you will get a different version of this ad code).

The code is generated by taking into consideration the domain name and the selected settings.

2. How does it work?

❗ This code is likely to be blocked by Adblock in a matter of days so if you copy-paste this code on your website manually we suggest updating it daily

or automatically using the PHP Library(which makes sure to keep the code up to date and replace it right away with a new one when it’s blocked by Adblock, automatically, through our API).

3. The PHP Library setup:

The PHP Library can be found in the Get Code section → Anti-Adblock segment.

1. Click the “Get the automated PHP Library” button:

2. Create the Anti-Adblock Key:

3. Once the key is generated, the following page will open:

4. Download the following PHP file and upload it to your website’s root folder using popcash.php as the file name.

⚠ On some browsers (including Google Chrome) the file download might be blocked (because it contains PHP code: https://prnt.sc/8J49w6fLo9gy).In this case, please copy the script to your clipboard and paste it into a new file called popcash.php.

Embed the PHP library on every page that you want to show our ads using the following PHP code: <?php include(‘popcash.php’); ?>

⚠ Most modern websites are based on CMS which have header.php / footer.php files in their templates. To place the code easily on all your website pages just include our php library either on header.php or footer.php.

4. Anti AdBlock manual implementation:

  1. Submit and choose your website of choice.

2. Go to the Get Code button from the Publisher section, once the website has been approved (⚠ the Javascript code will be generated only after approval):

3. Choose the Anti-Ad-Block Code, then click the “Copy code to clipboard” button, the copy your code.

4. Go to your website`s home page and access your website`s script by pressing CTRL + U keys on your keyboard.

5. Paste the JavaScript Code between the Body tag section from your website`s script (anywhere between <body> and </body. The mentioned keywords can be found by pressing CTRL + F and searching the mentioned keywords. Don’t forget the save before exiting the window.

6. To verify the correct implementation of the code, press CTRL + F on your keyboard and search for the “p$00a” word.

5. Anti AdBlock integration via the PopCash WordPress Plugin

Step 1. Install the PopCash Plugin

Login to WordPress and head over to the Plugins section on your dashboard.

Here, type “popcash” in the search bar and Install the PopCash Code Integration Tool.

If you can’t find it through the search you can download the plugin here: WordPress Plugins section.

Step 2. Activate the plugin

To be able to move further with the integration, simply click on the “Activate” button.

Step 3. Setup configurations

The PopCash plugin should now be present in the left sidebar of your WordPress dashboard. Click on the plugin to open it and finalize your configuration.

Move to the Anti AdBlock section and fill out the required information:

  • Insert the Anti AdBlock Api Key which you can generate in your PopCash account settings -> API Keys -> “Generate API” Key.
PopCash API key generator

In the pop-up window, fill out the relevant details:

PopCash API Key creation

After the API Key creation, copy it using the icon next to it and paste it into the PopCash WordPress Plugin.

PopCash API Key example
  • Insert your Website ID which you can grab from your “Get code” page in the PopCash publisher panel.

❗ If you’ve submitted more websites, make sure you are selecting the right one.

UserID, WebsiteID
  • Select the type of popunder fallback desired from the dropbox(tabunder, popup)
  • Input a frequency cap

❗ If you are using AdBlock please disable it before saving!

If you are using WordPress or Blogspot as your website host, we recommend following the next tutorials, for the automatic integration via plugins:

For any help, our support team is ready to assist you:

Email: contact@popcash.net
Skype: popcash.net
Whatsapp: +40 733712172
Telegram: @popcashnet

--

--

PopCash Team
PopCash

Worldwide Coverage — Guaranteed Results — Tailored Support