Download the PHP package detain/iptools without Composer

On this page you can find all versions of the php package detain/iptools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package iptools

IPTools

PHP Library for manipulating network addresses (IPv4 and IPv6).

Build Status Coverage Status Code Climate

Latest Stable Version Total Downloads License Monthly Downloads Daily Downloads composer.lock available

PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4

Changes since fork

Installation

Composer: Run in command line:

or put in composer.json:

Usage

This library breaks its handling down into IP, Range, and Network types and provdes a matching named class to make working with all things IP much simpler.

IP Operations

Parsing IP from integer, binary and hex:

or:

Converting IP to other formats:

Other public properties:

maxPrefixLength The max number of bits in the address representation: 32 for IPv4, 128 for IPv6.

octetsCount The count of octets in IP address: 4 for IPv4, 16 for IPv6

reversePointer The name of the reverse DNS PTR for the address:

Network Operations

Exclude IP from Network:

192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.168.0.0/24
192.168.1.0/32
192.168.1.2/31
...
192.192.0.0/10

Exclude Subnet from Network:

192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.168.0.0/24
192.168.2.0/23
...
192.192.0.0/10

Exclude Many Subnets from Network:

192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.168.0.0/24
192.168.3.0/23
...
192.192.0.0/10

Split network into equal subnets

192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24

Iterate over Network IP adresses:

192.168.1.0
...
192.168.1.255

Get Network hosts adresses as Range:

192.168.1.1
...
192.168.1.254

Count Network IP adresses

Range Operations

Define the range in different formats:

Check if IP is within Range:

Check if IP is within any of the Ranges in an array:

Check if IP is within all of the Ranges in an array:

Iterate over Range IP adresses:

192.168.1.1
...
192.168.1.254

Get Networks that fit into a specified range of IP Adresses:

192.168.1.1/32
192.168.1.2/31
192.168.1.4/30
192.168.1.8/29
192.168.1.16/28
192.168.1.32/27
192.168.1.64/26
192.168.1.128/26
192.168.1.192/27
192.168.1.224/28
192.168.1.240/29
192.168.1.248/30
192.168.1.252/31
192.168.1.254/32

Count IP adresses in Range

License

The library is released under the MIT.


All versions of iptools with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-bcmath Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package detain/iptools contains the following files

Loading the files please wait ....