-
Notifications
You must be signed in to change notification settings - Fork 5
DomainWhoIs()
Through this explanation we assume that you have using WHMCS_API;
on the begining of the file
And the API()
class initialized as _api
If needed check the Getting Started page
Prototype: public DomainWhoIs DomainWhoIs(string Domain)
Input:
- Domain: The domain to be checked (required)
Output: DomainWhoIs
Model
Exception: "An API Error has Ocurred" witch contains an inner exception with further explanation of the error
To call it just use DomainWhoIs dwhi = _api.DomainWhoIs("example.com");
The DomainWhoIs model does not have it's own namespace!
The result will be stored in dwhi variable with the result of the call (it should allways be success) the domain status and whois
The status dwhi.Status
it's the registration status: available or unavailable
The whois dwhi.WhoIs
is only returned if the domain is unavailable. The whois may or may not be an json string (when I tested it wasn't therefore there is no model built for it.
View all details about DomainWhoIs Model
WHMCS API Reference: https://developers.whmcs.com/api-reference/domainwhois/
using WHMCS_API;
namespace YourApp
{
class YourClass
{
public void YourFunction()
{
API _api = new API("username", "password", "accesskey", "url");
DomainWhoIs dwhi = _api.DomainWhoIs("example.com");
Console.WriteLine("Domain Status: {0}", dwhi.Status);
}
}
}
PCDev Open Source Development Team 2017