2017 © Pedro Peláez
 

yii2-extension yii2-ip-calc

Simple IP calculator, which can be used as basic Model in Yii2

image

muvo/yii2-ip-calc

Simple IP calculator, which can be used as basic Model in Yii2

  • Friday, September 1, 2017
  • by muvo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 79 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 11 % Grown

The README.md

Simple IP calculator

Quick start

Add model to your project, (*1)

$ composer require muvo/yii2-ip-calculator "*"

or add this into section require of your composer.json:, (*2)

...
    "require" : {
        ...
        "muvo/yii2-ip-calc" : "*"
    }
...

then run, (*3)

$ composer update

Basic usage

Examples

$ipv4 = address\IPv4('192.168.0.3/24');

echo $ipv4->ip;         // 192.168.0.3      # Actual IP address
echo $ipv4->net;        // 192.168.0.0      # Address of current IP network
echo $ipv4->mask;       // 255.255.255.0    # Netmask in string format
echo $ipv4->prefixlen;  // 24               # Prefix length of current network
echo $ipv4->broadcast;  // 192.168.0.255    # Broadcast address of network
echo $ipv4->first;      // 192.168.0.1      # First **REALLY AVAILABLE** IP for using
echo $ipv4->last;       // 192.168.0.254    # Last **REALLY AVAILABLE** IP
echo $ipv4->cidr;       // 192.168.0.0/24   # Network address written in CIDR format

Credits

Vladislav Muschinskikh i@unixoid.su © 2016, (*4)

The Versions

01/09 2017

dev-develop

dev-develop

Simple IP calculator, which can be used as basic Model in Yii2

  Sources   Download

The Requires

 

by Vladislav Muschinskikh

yii2 address model ip

01/09 2017

dev-master

9999999-dev

Simple IP calculator, which can be used as basic Model in Yii2

  Sources   Download

The Requires

 

by Vladislav Muschinskikh

yii2 address model ip

01/09 2017

2017.09.01.2

2017.09.01.2

Simple IP calculator, which can be used as basic Model in Yii2

  Sources   Download

The Requires

 

by Vladislav Muschinskikh

yii2 address model ip