承接 sirmerdas/ip-helper 相关项目开发

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

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

sirmerdas/ip-helper

最新稳定版本:v1.0

Composer 安装命令:

composer require sirmerdas/ip-helper

包简介

Package that helps you to work with ips.

关键字:

README 文档

README

Just a real simple package which helps you to work with different versions of ips.

Requirements:

  • php ^ 8.0
  • phpunit/phpunit": ">=11.1"

Installation

Run this composer code $ composer require sirmerdas/ip-helper

Basic Usage

use Sirmerdas\IpHelper\IpTools;

include "vendor/autoload.php";


print_r(IpTools::getClientIpInfo()); // [[address] => ::1,[version] => 6]
Get given ip address version
echo IpTools::getIpVersion("::1"); // 6
Check if given ip is version 4
var_dump(IpTools::verifyIpV4("::1")); // false
Check if given ip is version 6
var_dump(IpTools::verifyIpV6("::1")); // true
Generate a random ip version 4
echo IpTools::fakeIpV4(); // 127.0.0.1
Generate a random ip version 6
echo IpTools::fakeIpV6(); // ::1

License

  • This package is This package is created and modified under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-23