定制 edns-andrew/osrs-toolkit-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

edns-andrew/osrs-toolkit-php

最新稳定版本:v1.2.1

Composer 安装命令:

composer require edns-andrew/osrs-toolkit-php

包简介

OpenSRS PHP Toolkit

README 文档

README

The purpose in building out these libraries is to help ease the implementation of the OpenSRS API. Not only does it give a starting point in developing an application to allow for quick integration, but also incorporates new communication markup languages such as JSON and YAML.

Support

Our support team will be able to help with general connectivity issues outlined in: (http://domains.opensrs.guide/docs/troubleshooting)

If you find a bug in the sample provided with this toolkit, please contact OpenSRS Support with the XML output and response. We will not, however, be able to troubleshoot PHP configuration with your web host nor additional PHP code that you developed. Should you require assistance on those matters, please work with a website developer.

Requirements

This PHP library currently supports data being passed in JSON and YAML (it is also being extended to pass data in XML and Array format as well).

The OpenSRS PHP Tookit requires:

Installation

composer require edns-andrew/osrs-toolkit-php

Configuration

To configure your OpenSRS API settings, copy the sample config file openSRS_config.php.template and modify with your own OpenSRS API settings. Be sure to require your config before using. For more details see the following section on Boostrapping.

For more detailed configuration information refer to (https://github.com/OpenSRS/osrs-toolkit-php/wiki/Configuration)

Bootstrapping

You can bootstrap the OpenSRS toolkit by sourcing the composer autoloader, as well as your OpenSRS config file. For example if you saved your OpenSRS config file as config/openSRS_config.php, you would bootstrap by running the following:

require_once('vendor/autoload.php');
require_once('config/openSRS_config.php');

Using the toolkit

require_once('vendor/autoload.php');
require_once('config/openSRS_config.php');

try {
    $request = new Request();
    $response = $request->process('array', $data);

    // dump raw results
    var_dump($response->resultRaw);

} catch (\OpenSRS\Exception $e){
    // handle exception(s)
}

Refer to the OpenSRS API Documentation Page for available requests & attributes.

Backwards Compatibility

For pre v4.0.0 users, backwards compatibility has been included so you can continue using the toolkit as you were before.

require_once ("your_root_path/opensrs/openSRS_loader.php");

$data = array (
    "func" => "lookupLookupDomain",
    "data" => array (
        "domain" => "google.com",
    )
);

$osrsHandler = processOpenSRS ("array", $data);

var_dump($osrsHandler);

Documentation

OpenSRS API Documentation Page

OpenSRS/osrs-toolkit-php Wiki

统计信息

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

GitHub 信息

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

其他信息

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