承接 madbob/manydns 相关项目开发

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

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

madbob/manydns

Composer 安装命令:

composer require madbob/manydns

包简介

Wrapper for many dynamic DNS providers

README 文档

README

This package wraps the update API for many different dynamic DNS providers.

Currently supported providers:

Installation

composer require madbob/manydns

Usage

require 'vendor/autoload.php';

use ManyDNS\ManyDNS;
use ManyDNS\FailedUpdateException;

/*
	To obtain a list of supported providers
*/
$providers = ManyDNS::getProviders();
foreach($providers as $provider) {
	echo $provider->getName() . "\n";
}

/*
	getProvider() accepts the name of a supported provider, and returns a
	ManyDNS\Client object (or NULL if none is found).
*/
$provider = ManyDNS::getProvider('NoIP');

/*
	To perform a new update of DNS addressing, just call the updateNow()
	function on the preferred client.
	The $ip parameter is optional: most providers accepts the current public IP
	as default, if not the package tries to retrieve the current public IP of
	the instance.
*/
try {
	$provider->updateNow($username, $password, $hostname, $ip);
}
catch (FailedUpdateException $e) {
	/*
		In case of error, FailedUpdateException provides both a human message
		and an error code defined as:
		ManyDNS::ERROR_INVALID_AUTH
		ManyDNS::ERROR_INVALID_HOST
		ManyDNS::ERROR_UNKNOWN
	*/
	echo $e->getMessage() . "\n";
	echo $e->getCode() . "\n";
}

Special Behaviors

The DuckDNS authentication is based on a single token, to be used in place of the password when asking for an update.

$provider = ManyDNS::getProvider('DuckDNS');
$provider->updateNow(null, $token, $hostname, $ip);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固