dyninc/dyn-php 问题修复 & 功能扩展

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

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

dyninc/dyn-php

Composer 安装命令:

composer require dyninc/dyn-php

包简介

Dyn PHP SDK - for interaction with Dyn's product APIs

README 文档

README

This SDK allows PHP developers to interact with Dyn's product APIs from within their PHP applications. Feedback is welcome - please reach out via pull request, GitHub issue, or via. our Community forum.

Requirements

Requires PHP 7.4 or above. The cURL extension is recommended (although not required), and will be used if present.

Installation

The best way to install this SDK is with Composer. With Composer installed, run:

composer require dyninc/dyn-php

from the command line.

Quickstart - DNS

use Dyn\TrafficManagement;
use Dyn\TrafficManagement\Record\A;

$tm = new TrafficManagement('customerName', 'username', 'password');

// login
$tm->createSession();

// retrieve zone
$zone = $tm->getZone('example.com');

// configure a new record
$record = new A();
$record->setAddress('127.0.0.1');

// create the new record
$zone->createRecord($record, 'test.example.com');

// publish zone changes
$zone->publish();

// logout
$tm->deleteSession();

Quickstart - Email

use Dyn\MessageManagement;
use Dyn\MessageManagement\Mail;

$mm = new MessageManagement('YOUR API KEY');

// setup the message
$mail = new Mail();
$mail->setFrom('user@example.com', 'Joe Bloggs')
     ->setTo('janedoe@example.com')
     ->setSubject('Email sent via. Dyn SDK')
     ->setBody('The text of the email');

// send it
$mm->send($mail);

More detailed examples can be found in the examples folder.

API Endpoints Supported

  • Traffic Management - Session API: create/destroy/refresh
  • Traffic Management - Record API: AAAA A CERT CNAME DHCID DNSKEY DS IPSECKEY KEY LOC MX NAPTR NS NSAP PTR PX RP SOA SPF SRV SSHFP TXT
  • Traffic Management - Zone API: list/get/publish/freeze/thaw/getChanges/discardChanges
  • Traffic Management - HTTP Redirect service: create/update/list/destroy
  • Traffic Management - Dynamic DNS service: create/update/list/destroy
  • Message Management - All endpoints supported

Testing

With the Composer packages installed, unit tests can be run from this folder using the command:

./vendor/bin/phpunit --configuration test/phpunit.xml

统计信息

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

GitHub 信息

  • Stars: 21
  • Watchers: 24
  • Forks: 28
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-07-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固