
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Changed: | ||||||||
| < < | cPanel XMLAPI - setresolvers | |||||||
| > > | Set Resolvers — setresolvers | |||||||
| Changed: | ||||||||
| < < | This function configures the nameservers that your server will use to resolve domain names. It is highly important that your resolving nameservers work and work well or your server may have performance and stability issues. | |||||||
| > > | This function configures the nameservers that your server will use to resolve domain names.
| |||||||
| Added: | ||||||||
| > > |
Calling FunctionsUsing the XML API<--/twistyPlugin twikiMakeVisibleInline-->
To use the XML API to perform the functionname function from within your custom script:
<--/twistyPlugin--> Using the JSON API<--/twistyPlugin twikiMakeVisibleInline-->
To use the JSON API to perform the functionname function from within your custom script:
<--/twistyPlugin--> | |||||||
Variables | ||||||||
| Added: | ||||||||
| > > | ||||||||
Input | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > | The setresolvers function takes the following variables as input. While only the first is required, we recommend using more resolvers, if possible.
| |||||||
Output | ||||||||
| Changed: | ||||||||
| < < |
Example | |||||||
| > > |
Show Hide <--/twistyPlugin twikiMakeVisibleInline-->
<--/twistyPlugin--> ExamplesXML APIShow Hide<--/twistyPlugin twikiMakeVisibleInline--> | |||||||
| Changed: | ||||||||
| < < | Calling /xml-api/setresolvers?nameserver1=4.2.2.2&nameserver2=4.2.2.1 in WebHost Manager will produce output similar to: | |||||||
| > > | Calling the following URL: https://example.com:2087/xml-api/setresolvers?nameserver1=208.77.188.166&nameserver2=127.0.0.1 in WebHost Manager will produce output similar to: | |||||||
|
%CODE{lang="html"}%
| ||||||||
| Changed: | ||||||||
| < < | | |||||||
| > > | | |||||||
| | ||||||||
| Changed: | ||||||||
| < < | | |||||||
| > > | | |||||||
| %ENDCODE% | ||||||||
| Added: | ||||||||
| > > | <--/twistyPlugin--> | |||||||
| Changed: | ||||||||
| < < | CopyrightCopyright 2008 cPanel Inc. | |||||||
| > > | JSON APIShow Hide<--/twistyPlugin twikiMakeVisibleInline-->
Calling the following URL: https://example.com:2087/json-api/setresolvers?nameserver1=208.77.188.166&nameserver2=127.0.0.1 in WebHost Manager will produce output similar to:
<-- SyntaxHighlightingPlugin --> {
"setresolvers":[
{
"status":1,
"statusmsg":"Your resolvers have been setup!",
"msgs":[
"Listed in order they are:",
"208.77.188.166",
"127.0.0.1",
],
"warns":null
}
]
}
<-- end SyntaxHighlightingPlugin --> <--/twistyPlugin--> | |||||||
| \ No newline at end of file | ||||||||