jlaso/ovh-domain-api

ovh.com域名功能的客户端API

安装: 125

依赖: 0

建议者: 0

安全: 0

星标: 10

关注者: 2

分支: 2

开放问题: 0

类型:模块

dev-master 2018-11-14 20:31 UTC

This package is auto-updated.

Last update: 2024-09-15 09:56:29 UTC


README

Latest Stable Version Total Downloads

概述

此模块允许与ovh.com API进行通信

安装

检出代码副本:

// in composer.json
"require": {
    // ...
    "jlaso/ovh-domain-api": "*"
    // ...
}
// ..

在您的开发中使用API

use JLaso\OvhDomainApi\Service\OvhApi;

$ovhUser = "xxxxx-ovh";
$ovhPass = "123456";
define("SANDBOX_MODE", true);
$locale = "en";

$ovhApi = new OvhApi($ovhUser, $ovhPass, SANDBOX_MODE, $locale);

/*
 * To register a new domain 
 */
$ovhApi->registerDomain("example.com", $ovhUser);

/**
 * To check if a domain it's Available
 */
$isAvailable = $ovhApi->isAvailable("example.com");

print ($isAvailable ? 'The domain is AVAILABLE' : 'The Domain is UNAVAILABLE');

/**
 * To create an [ownerId](http://www.ovh.com/soapi/en/?method=nicCreate) (individual) 
 * to register domains in this account
 */
$ownerId = $ovhApi->createOwnerId(new OwnerDomain(
    'email@example.com',
    'My Name',
    'My LastName',
    'mypassword1234',
    'My Address',
    'My Area',
    'My City',
    'My Country',
    'My Zip Code',
    'My-Phone-Number',
    'My-fax-or-null'
));

$ovhApi->registerDomain('example.com', $ownerId);

您可以在示例文件夹中查看SimpleSample。

更多详细信息请访问ovh页面