Resellme - Resell Domains & Hosting
  • About
  • Docs
  • Blog
  • Support
  • Login
  • Register

›SDKs

Getting Started

  • Getting Started
  • Setup & Integration of Keys

How it Works

  • How it works

SDKs

  • PHP SDK Index
  • Node.JS SDK
  • Python SDK

Integrations & Plugins

  • WHMCS Module
  • WordPress Plugin

API Reference

  • API Reference

PHP SDK Guide

Installation

This SDK can be installed via composer.

$ composer require privyreza/rm-php-sdk

Usage

Make sure you already got you developer token. If you dont have the token refer to this guide: - and that its set properly using this guide: -

Initialization

require "vendor/autoload.php";
$token = getenv('RM_TOKEN');
// Load the Client
use Resellme\Client;

// Initialize the Client
$client = new Client($token);

Check Domain Availability

$domain = 'resellme-testdomain.co.zw';

/*
 * Check availability
 * @return array - with domain status
 *
 */
$domainSearch = $client->searchDomain($domain);

Registering a New Domain

Make sure you are testing on the sandbox platform.

/**
 * Domain Details
 *
 */
// Domain Owner
$contact = [
    "contacts" => [
        "registrant" => [
            "first_name" => "SDK Privy",
            "last_name" =>"SDK Reza",
            "email" =>"privyreza@xxx.com",
            "company" =>"SDK Company",
            "mobile" =>"0773234827",
            "street_address" =>"78 Test Street",
            "core_business" =>"SDK Test Core Business",
            "city" =>"Nairobi",
            "country" =>"Kenya"
        ]
    ]
];

// Nameservers
$nameservers = [
    "ns1" => "ns1.cloud-dns.com",
    "ns2" => "ns2.cloud-dns.com"
];

// Prepare the data
$data = [
    'domain' => $domain,
    'nameservers' => $nameservers,
    'contacts' => $contacts
];     

/**
 * Register the domain now
 * @return array
 *
 */
$domain = $client->registerDomain($data);

Get Domains

You can use this to fetch all your domains. You can pass filters if you want a filtered result.

$filters = [
    'status' => 'registered' // Get Registered only domains
    'name' => 'resellme-testdomain.co.zw' // Get By Domain name
];

$domains = $client->getDomains($filters);
Last updated on 6/7/2020 by Privy
← How it worksNode.JS SDK →
  • Installation
  • Usage
    • Initialization
    • Check Domain Availability
    • Registering a New Domain
    • Get Domains
Documentation
Getting StartedGuidesAPI Reference
Libraries & Plugins
PHPNode.JSPython.Net
Support
Get Support
Resellme Platform
Copyright © 2020 Resellme