synchro/ptrify 问题修复 & 功能扩展

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

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

synchro/ptrify

最新稳定版本:v1.0.0

Composer 安装命令:

composer require synchro/ptrify

包简介

A utility class for generating DNS PTR records

README 文档

README

Synchro/Ptrify Logo

GitHub Workflow Status (main) Total Downloads Latest Version License

Ptrify

This package provides a simple utility class for converting IP addresses to the format needed for DNS PTR records as defined in RFC1035 and RFC3596. While this can be done manually, it's a slightly tricky process that's easy to get wrong. This package aims to make it easier to generate PTR records for both IPv4 and IPv6 addresses.

This class does not attempt to handle subnets or wildcards, such as those discussed in RFC 4472; It is intended for use with single IP addresses only.

Requires PHP 8.1+

Installation

Install with Composer:

composer require synchro/ptrify

Usage

use Synchro\Ptrify\Ptrify;

$ptr = Ptrify::ptrify('192.0.2.151');
//$ptr == '151.2.0.192.in-addr.arpa'

$ptr6 = Ptrify::ptrify('2001:db8:f00::12:34ff:fe56:789a');
//$ptr6 == 'a.9.8.7.6.5.e.f.f.f.4.3.2.1.0.0.0.0.0.0.0.0.f.0.8.b.d.0.1.0.0.2.ip6.arpa'

Passing an invalid IP address (either v4 or v6) will throw an InvalidArgumentException.

Contributing

See CONTRIBUTING.md for information, including coding standards and how to run tests.

Logo image based on this image of petrified wood by Petrifed ForestNPS under CC BY 2.0.

Package built from Skeleton PHP by Nuno Maduro under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固