bennetgallein/bind-php-wrapper 问题修复 & 功能扩展

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

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

bennetgallein/bind-php-wrapper

Composer 安装命令:

composer require bennetgallein/bind-php-wrapper

包简介

A Wrapper to bind the PythonAPI to PHP

README 文档

README

This a PHP Library to communincate with the Python REST API for BIND DNS-Server.

Installation

composer require bennetgallein/bind-php-wrapper

Getting started

This library requires the Python API to be setup up correctly and working. If that is the case, follow these Instructions:

create new BIND Instance:

$bind = new BIND("192.168.1.104", 5000, false);

Parameters:

  • IP (no default)
  • Port (default: 5000)
  • HTTPS (default: false) Important: Only use http if you are in a safe local enviorment. Otherwise a Reverse Proxy is the way to go!

List all Records for a Zone:

$a = $bind->getZone("gallein2.de");

This returns a new Zone Object:

$a->getDomain(); // returns the Domains name
$a->getRecords(); // returns an array of Record-Objects

The Record Object:

foreach ($a->getRecords() as $record) {
    echo $record->getName(); // The name, like '@', 'wwww', 'test', 'test2', ...
    echo $record->getAnswer(); // the response the DNS Server will give
    echo $record->getRecordType(); // the Record Type, like 'A', 'AAAA', 'MX', ...
    echo $record->getTTL(); // The TTL (Time To Live) of the Entry.
}

Update/set a Record:

$res = $bind->addRecord("gallein2.de", "86400", "A", "192.168.1.1");
if ($res) {
    // yeah, success
} else {
    // no success
}

Delete a Record:

$res = bind->deleteRecord("gallein2.de", "86400", "A", "192.168.1.1");
if ($res) {
    // yeah, success
} else {
    // no success
}

Contributions and Issues are open

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-10-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固