mindpowered/iptools
Composer 安装命令:
composer require mindpowered/iptools
包简介
Tools for working with IP4/IP6 IP Addresses including IPv4, IPv6, CIDR, and Subnet Masks
README 文档
README
Tools for working with IP4/IP6 IP Addresses including IPv4, IPv6, CIDR, and Subnet Masks
Contents
Source Code and Documentation
- Source Code: https://github.com/mindpowered/ip-tools-php
- Documentation: https://mindpowered.github.io/ip-tools-php
About
IPv4 uses a 32-bit address for its Internet addresses. All IPv4 addresses are now assigned. IPv6 utilizes 128-bit Internet addresses so there are 1028 times more addresses. Mappings exist for converting from an IPv4 address to an IPv6 addresses. This allows interoperability.
An IP address consists of octets delimited by dots (".") for IPv4 or colons (":") for IPv6. We can compress IPv6 addresses by removing extra zeros to make the address shorter. Computers store IP addresses as their corresponding integer values. The number represented by this integer is its decimal representation.
Subnetting is the process of dividing a network into smaller network sections. A part of the IP address is masked off to define a network. The remaining part of the address identifies a device on the network. CIDR is an alternative way of representing a subnet mask and IP address range.
Requirements
- php >= 7
- php
mbstringextension - php
xmlextension
Third-party dependencies may have additional requirements.
Installation
You can get iptools using Composer. Composer manages dependencies for packages from Packagist and you can get it here: https://getcomposer.org/ .
Create a composer.json file in the top-most directory of your project and add mindpowered/iptools to the requirements:
{
"require": {
"mindpowered/iptools" : "*"
}
}
Now you can run the command to update composer: composer update. In order for composer to install the package dependencies you will need an archive manager such as zip installed. Composer requires use of the commands zip and unzip.
Usage
require __DIR__ . '/vendor/autoload.php'; use \mindpowered\iptools\IPTools; $ipt = new IPTools(); $decimal = $ipt->IPToDecimal("192.168.1.1");
Support
We are here to support using this package. If it doesn't do what you're looking for, isn't working, or you just need help, please Contact us.
There is also a public Issue Tracker available for this package.
Licensing
This package is released under the MIT License.
mindpowered/iptools 适用场景与选型建议
mindpowered/iptools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.03k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 12 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mindpowered/iptools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mindpowered/iptools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-10