承接 hiqdev/php-ip-tools 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hiqdev/php-ip-tools

最新稳定版本:1.1.0

Composer 安装命令:

composer require hiqdev/php-ip-tools

包简介

A library based on rlanvin/php-ip for IP addresses calculations

README 文档

README

GitHub Actions Infection MSI

This library provides tooling for IP address calculations based on rlanvin/php-ip

Free IP blocks calculation

Compute the best possible aligned IP blocks within a given range, excluding the taken blocks or IP addresses.

Example:

$block = '192.168.0.0/24';
$taken = ['192.168.0.64/28'];

$calculator = new IpBlocksCalculator();
$free = $calculator->__invoke($block, $taken);

var_dump($free);
/*
 *  [
 *    '192.168.0.0/26',
 *    '192.168.0.80/28',
 *    '192.168.0.96/27',
 *    '192.168.0.128/25',
 *   ]
 */

See more examples in IpBlocksCalculatorTest.

IP ranges parsing

Parse fuzzy IP address block definitions and unwrap it to an array:

Example:

IpRangeParser::fromString('192.0.2.[1,2,100-250]/24');
// ['192.0.2.1/24', '192.0.2.2/24', '192.0.2.100/24' ... '192.0.2.250/24']

See more examples in IpRangeParserTest.

统计信息

  • 总下载量: 5.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固