Cookie consent

This website uses cookies to personalise content and to analyse our traffic.

Necessary - Necessary cookies needed to make a website usable by enabling basic functions. The website cannot function properly without these cookies. (always active)
Marketing - Marketing cookies are used to track visitors across websites.

Online Solutions Development Blog   |  

RSS

Tag Archives: ip

posted by ,
Categories: PHP
Tags , , ,

Below you can find a simple php script that blocks ip addresses. It uses a function (called iplong) that converts the standard IPv4 address to a long int value and the main function (ban) that checks if a provided ip can be found in a list of blocked addresses. Hope you will find this useful. …