Accessing the Dedicated Server API with PHP

Customers using PHP will need to do the following steps in order to call the Dedicated Servers API’s services (its functions).
 
General Information
 
  • The Dedicated Server API uses SOAP to communicate.
 
Set Up Steps to Use the API Services (the functions)
 
  1. Reference the following: http://api.reliablesite.net/dedicated-servers.svc?wsdl to review the function calls of the API service.
  2. The WSDL file has been converted into classes (via wsdltophp.com) for ease of use and can be downloaded at http://api.reliablesite.net/dedicated-servers-php.zip
  3. Unzip the file into your programming directory and use the "sample-dedicatedservers_.php" file for examples of calling each function within the API.
 
Demonstration on How to Code a Call to an API Function
 
Calling the “User Management” service's “validate a user login” functionality.
 
Function to be called along with the required parameters:
     UsersList(keyToAccessApi, passwordToAccessApi)
 
The function results and user object (the user details) are passed back to the calling client.
 
The reseller either passed or did not pass API security.
The reseller’s user passed its validation or did not.
<?php

ini_set('memory_limit','512M');
ini_set('display_errors',true);
error_reporting(-1);

require_once dirname(__FILE__) . '/DedicatedServers_Autoload.php';

$dedicatedServers_ServiceUsers = new DedicatedServers_ServiceUsers();

if($dedicatedServers_ServiceUsers->UsersList(new DedicatedServers_StructUsersList("apikey","apipassword")))
    print_r($dedicatedServers_ServiceUsers->getResult());
else
    print_r($dedicatedServers_ServiceUsers->getLastError());
?>
 
 

Add Feedback