Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
PHP Scripts / Miscellaneous

PBipcheck - PHP Country Access Blocker

— Add-On to

Subscribe to our feed to stay up to date!

New! Follow us as you want it!

PBipcheck - PHP Country Access Blocker - CodeCanyon Item for Sale


Ad: Bluehost hosting


The PBipcheck tool is a PHP country access blocker and can allow or deny the access to scripts, websites or web applications for visitors from specified countries. It is also possible to specify which bots and spiders can access the site and which are blocked (user agent check and DNS lookup). The PBipcheck tool uses a database converter which downloads the GeoLite database (IPv4 version) from the MaxMind website and converts the data into an IP list which is used to check the access. The log analyzer displays useful information about the access data gathered from the created log files. The user can see the number of log entries, how many times the access for visitors was allowed/denied, the used access status, how many unique visitors/IP addresses were active, number of detected fake bots, number of detected unwanted bots, number of allowed bots, the minimum, maximum and average processing time. The IP number (similar like IP address) of the allowed visitors are cached to speed up the process. It is possible to have different configurations for different websites or applications. The PBipcheck tool has a well written User Manual of 77 pages (2.8 MB – PDF format).

This script is for everyone who wants to restrict the access to his websites or applications for visitors from specific countries and also specific bots and spiders (You need to know how to upload files to your webhost, how to edit configuration files and optional how to password protect a directory.)

Please check the User Manual, the Screenshots and the Online-Demo for more information!

ATTENTION: This tool works with the IPv4 GeoLite database and does not support IPv6 addresses!

I hope you like this tool!

Included Tools:

  • Menu script to access the tools and logs
  • IP check script (function) to allow or deny the site access
  • Information page to display the status information (return array)
  • Database converter to download and convert the GeoLite database
  • Log analyzer to display a lot of useful access information
  • Cache eraser script to delete an existing cache file
  • Two tiny example applications to show the integration of the tool

New Features in Version 1.9:

  • Checking structure optimized
  • Some small errors fixed (exclude IPs)
  • Updated user manual (77 pages in PDF format)

New Features in Version 1.7:

  • New log analyzer to show a lot of useful access information
  • More unwanted bots added to the block list
  • Improved user manual (77 pages in PDF format)
  • Small bugs fixed

New Features in Version 1.6:

  • Better bot/spider check to detect fake bots/spiders
  • Reverse/forward DNS lookup to check the bot domain and IP address
  • Caching of the IP number for allowed bots (bot cache file)
  • Improved caching speed for allowed visitors (IP cache file)
  • Country list from GeoLite database to copy into the configuration
  • Option to deny access to visitors with an empty user agent string
  • Improved logfile which displays access status and processing time
  • Improved user manual (73 pages in PDF format)
  • Small bugs fixed

Features in Version 1.5:

  • Block or allow the visitors from specific countries
  • Block or allow the bots specified in the configuration file
  • Exceptions for specified IP addresses
  • Very extensive user manual of 60 pages
  • The user manual covers the installation, configuration and use
  • Menu page with links to all the tools, examples and the manual
  • Database converter to convert the GeoLite data into an IP list
  • Converter downloads the GeoLite database from MaxMind
  • Script / function which can be included into your own projects
  • Information array returned by the function
  • Info page which displays the content of the information array
  • Cache eraser tool to clear the IP number cache
  • Logfile for allowed and/or denied access
  • Two small example applications are included
  • Examples show how to integrate the script into your own projects
  • Different configuration options (logging, exceptions, cache size…)
  • Different configurations can be used for different projects
  • Just exit the script if a visitor is blocked
  • Display an error (500 Internal Server Error) for blocked visitors
  • Forward blocked visitors to another URL
  • Matching results (allowed or blocked) are cached
  • Easy installation (upload/copy the files, set permissions)
  • Easy configuration (edit the configuration files)
  • Full source code available (PHP, HTML and CSS)
  • Low hard- and software requirements
  • No MySQL database needed


  • Linux, Unix or Windows based webserver like Apache
  • FTP access to your webserver (for installation)
  • FTP client application like Filezilla (for installation)
  • Possibility to change directory/file permissions on host
  • Possibility to password protect directories (optional)
  • PHP version >= 5.2 installed
  • PHP function fopen() enabled
  • ZIP compression and archive extension installed and enabled
  • New webbrowser like Internet Explorer, Firefox or Opera


The following PHP code is the example application 1 and shows, how easy it is to use this tool in your own projects:

echo "Application 1 - Access allowed!";

Please read the User Manual to see more examples and how to use this tool in your own application!

Live Preview:

Here you can try the online demo: Online-Demo


Here you can check the screenshots: Screenshots


Here you can read the user manual (2.8 MB – PDF format): User Manual


If you need support, please use the Contact Form on my Author Page and we are glad to help!

You can also use the Comments Page to submit a question!


If you like the script we would like to get your feedback on the Comments Page and maybe you could rate the script :-)

Versions (Updates):

  • 10.08.2015 – Version 1.9 – New Update (errors fixed)!
  • 11.04.2013 – Version 1.7 – New Update!
  • 03.04.2013 – Version 1.6 – New Update!
  • 29.03.2013 – Version 1.5 – Initial release on Codecanyon

Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers


29 March 13

Last Update:
9 August 15

Compatible Browsers:
IE9, IE10, IE11, Firefox, Safari, Opera, Chrome

Files Included:

Software Version:
PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6


eCommerce, eCommerce, All Items, access, allow, application, block, bot, check, control, country, deny, ip address, script, spider, user agent, visitor, website