naturalbuild/namecheap-sdk 问题修复 & 功能扩展

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

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

naturalbuild/namecheap-sdk

最新稳定版本:v1.0.4

Composer 安装命令:

composer require naturalbuild/namecheap-sdk

包简介

SDK library for Namecheap APIs

README 文档

README

Latest Version Build Status Total Downloads

Namecheap SDK is a PHP lib that makes it easy to manage Namecheap APIs.

API Methods Examples:

Create a connection to the Namecheap API which you can then pass into other services, e.g. domains, later on

#getDoaminList.php require_once "vendor/autoload.php"; $apiUser = $userName = 'ncusername'; $apiKey = '****************************'; $clientIp = '198.168.0.123'; // Return type can be: xml (default), array, json $returnType = 'json'; $client = new Namecheap\Api($apiUser, $apiKey, $userName, $clientIp, $returnType); $client->setCurlOption(CURLOPT_SSL_VERIFYPEER, false); // For local development env (if needed) $ncDomains = new Namecheap\Domain\Domains($client); $ncDomains->enableSandbox(); // Enable sandbox mode for the current instance $domainList = $ncDomains->getList(); print_r($domainList); 
$contactsInfo = $ncDomains->getContacts($domainName); $result = $ncDomains->create($dataArr);

domains

$ncDomains = new Namecheap\Domain\Domains($apiUser, $apiKey, $userName, $clientIp, 'json'); $domainList = $ncDomains->getList(); $contactsInfo = $ncDomains->getContacts($domainName); $result = $ncDomains->create($dataArr);

domains.dns

$ncDomainsDns = new Namecheap\Domain\DomainsDns($apiUser, $apiKey, $userName, $clientIp); $list = $ncDomainsDns->getList('domain', 'com'); $default = $ncDomainsDns->setDefault('domain', 'com');

domains.ns

$ncDomainsNs = new Namecheap\Domain\DomainsNs($apiUser, $apiKey, $userName, $clientIp); $list = $ncDomainsNs->create('domain', 'com', 'ns1.domain.com', '192.165.15.103');

domains.transfer

$ncDomainsTrns = new Namecheap\Domain\DomainsTransfer($apiUser, $apiKey, $userName, $clientIp); $getStatus = $ncDomainsTrns->getStatus($transferID);

ssl

$ncSsl = new Namecheap\Ssl\Ssl($apiUser, $apiKey, $userName, $clientIp); $result = $ncSsl->create($Years, $Type, $SANStoADD, $PromotionCode);

users

$ncUsers = new Namecheap\Users\Users($apiUser, $apiKey, $userName, $clientIp); $pricing = $ncUsers->getPricing('DOMAIN'); $userBal = $ncUsers->getBalances(); # Change password $result = $ncUsers->changePassword($oldPassword, $newPassword); # Reset pass $result = $ncUsers->changePassword($resetCode, $newPassword, true);

users.address

$ncUsersAddr = new Namecheap\Users\UsersAddress($apiUser, $apiKey, $userName, $clientIp); $getStatus = $ncUsersAddr->getInfo($AddressId);

whoisguard

$ncWhoisguard = new Namecheap\Whoisguard\Whoisguard($apiUser, $apiKey, $userName, $clientIp); $result = $ncWhoisguard->getInfo($WhoisguardID, $ForwardedToEmail);

Help and docs

Installing

The recommended way to install Namecheap-sdk is through Composer.

# Install Composer curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Namecheap-sdk:

php composer.phar require saddamrhossain/namecheap-sdk

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update namecheap-sdk using composer:

composer.phar update

Version Guidance

Version Status Packagist Namespace Repo Docs PSR-7 PHP Version
1.x --- saddamrhossain/namecheap-sdk Namecheap - - No >= 5.6

统计信息

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

GitHub 信息

  • Stars: 16
  • Watchers: 0
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固