Download the PHP package matracine/ip-tools without Composer

On this page you can find all versions of the php package matracine/ip-tools. 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 ip-tools

IPTOOLS

PHP Library for manipulating network addresses.

This library implements tools for IP network address manipulations. It actualy impelments IPv4 only classes, but IPv6 will come. It has no dependencies others than PHP 7.0.

Classes :

Please feal free to open issue for improvements, bugs, requests... IPv6 implementation is on the way.

Docblock documentation implemented.

QA

Service Result
Travis CI (PHP 7.0 + 7.1 + 7.2) Build Status
Scrutinizer score Scrutinizer Code Quality
Code coverage Code Coverage

Installation

With composer:

Usage

IPv4\Address

Class for IPv4 Address manipulation.

An IP address is no more than a 32 bits integer. To be more human readable, the dot quad string notation is commonly used (ex : "123.235.123.213").\ Class is immutable : once created cennot be modified. Opérations on an existing instance will return a new instance.

Namespace :

Create an IPv4 Address :

Constructor use integer

Helpers

Retreive value

Operations

Qualify

TODO

IPv4\Netmask

Class for IPv4 Netmask manipulation.

A Netmask is an IP Address (Netmask extends Address) with only special values allowed (255.255.255.0, 255.0.0.0 etc.). In fact only 33 values are allowed... All Address methods are usable with Netmask, even if certains are meaningless (isRFC1918, getClass...).

Namespace :

Create an IPv4 Netmask :

Constructor use integer

Helpers

Netmask extends Address, so Address helpers are availables. Check are done, Exceptions are thrown when values cannot be used to create valid Netmask.

Retreive value

Use Address methods plus

Operations

Address methods are modified to correspond to the Netmask logic. When shifting a Netmask, we increment or decrement CIDR vaue by the offset.

IPv4\Range

Class for IPv4 Ranges manipulation.

A Range of IP Addresses is consecutives IP addresses, determined by a lower and a upper boundaries. Class is immutable : once created cannot be modified. Opérations on an existing instance will return a new range instance or a fresh Address instance.

Namespace :

Create an IPv4 Range :

Constructor use an lower bound Address and a upper bound Address. Arrange bounds, no need to passer lower bound first

Helpers

Retreive values

Operations

Qualify

IPv4\Subnet

Class for IPv4 Subnets manipulation.

A Subnet is a range (Subnet extends Range) of IP Addresses, determined by a network address and a netmask. Class is immutable : once created cennot be modified. Opérations on an existing instance will return a new subnet instance or a fresh Address instance.

Namespace :

Create an IPv4 Subnet :

Constructor use an Address (network address) and Netmask.

By default, strict network/netmask validity checking is enabled. You can specify third optional parameter (strict) to false to enable intelligent network address calculation, and provide an address within the subnet.

Helpers

Retreive values

Range methods plus :

Operations

Same as Range methods...


All versions of ip-tools with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
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 matracine/ip-tools contains the following files

Loading the files please wait ....