muvo/yii2-ip-calc 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

muvo/yii2-ip-calc

Composer 安装命令:

composer require muvo/yii2-ip-calc

包简介

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

README 文档

README

Quick start

Add model to your project

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

or add this into section require of your composer.json:

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

then run

$ 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

统计信息

  • 总下载量: 366
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-04-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固