rimelek / ip-util
Handle IP addresses and ranges
Installs: 1 145
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2024-10-26 22:18:30 UTC
README
Full documentation
The goal of the library
Sometimes you need to work with IP addresses. For example, you want to restrict access to a website, but the restriction depends on a list of IP addresses from a database or other sources. Imagine you are a developer in an institution that has a large network with many subnets or individual PCs. You want to make sure the service is available only for coworkers in the subnets of the institution even if the server is accessible publicly. So anyone can manage the addresses in the database and set a minimum and maximum IP addresses of one or many IP ranges, and you can provide an api to get CIDR notations or find overlapping IP ranges and fix them.
This is the goal of the library. To make it simple and give you a tool to work with IPv4 and IPv6 addresses.
Requirements
- PHP 5.6
- Composer
License
MIT
DEMO
If you want to see some live examples what the library can do for you, check the following page on IT sziget: https://app.it-sziget.hu/en/iputil