Description
This function adds an IP address to the list of trusted IP addresses.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Input |
Type |
Description |
Possible values |
Example |
ip |
string |
Required The IP address. |
A valid IP address |
192.168.0.20 |
Returns
Return |
Type |
Description |
Possible values |
Example |
status |
string |
Whether the function added the IP address. |
|
1 |
ip |
string |
The IP address. |
A valid IP address. |
192.168.0.20 |
error |
string |
Whether the function succeeded. |
|
null |
reason |
string |
A reason for failure. Note: This function only returns a reason value if there was an error. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |