adrenlinerush / namecheap-rest-php Goto Github PK
View Code? Open in Web Editor NEWThis project forked from skpy/namecheap-rest-php
a PHP class for accessing the Namecheap REST API
License: Apache License 2.0
This project forked from skpy/namecheap-rest-php
a PHP class for accessing the Namecheap REST API
License: Apache License 2.0
Namecheap-REST-PHP - a simple PHP library for using the Namecheap REST API http://developer.namecheap.com/docs/doku.php?id=api-reference:index *** ABOUT *** This is a simple single-file class for accessing the Namecheap REST API. Methods are loosely named after the corresponding API endpoint. namecheap.domains.check == domainsCheck() namecheap.domains.create == domainsCreate() namecheap.domains.ns.create == nsCreate() namecheap.domains.dns.setCustom == dnsSetCustom() The class fully supports the Namecheap Sandbox (https://www.sandbox.namecheap.com) during object construction. The raw response from the Namecheap API is available as a public variable "$Raw". Any call the results in an error stores the full error in a public variable "$Error". *** USAGE *** include_once( 'namecheap.php' ); $nc_api = array( 'api_user' => 'username', 'api_key' => 'some_key', 'api_ip' => 'detect' ); $sandbox = 'true'; // use the Namecheap sandbox to test $nc = new Namecheap( $nc_api, $sandbox ); if ( $nc->domainsCheck( 'example.com' ) ) { echo "<p>example.com is available!</p>"; } $domains = array( 'example.net', 'example.org', 'example.info' ); $results = $nc->domainsCheck( $domains ); echo "<ul>"; foreach ( $results as $domain => $available ) { $status = ( $available ) ? 'available' : 'not available'; echo "<li>$domain: $status</li>"; } echo "</ul>"; // registering a domain requires an awful lof of mandatory data: // http://developer.namecheap.com/docs/doku.php?id=api-reference:domains:create // stick all that in an associative array if ( ! $nc->domainCreate( 'example.com', $registration_data ) ) { print_r( $nc->Error ); } *** LICENSE *** Copyright 2011 Scott Merrill Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.