This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recieve an indexed array of IPs and their associated reverse DNS hostnames | |
* when providing an IP address. This reuiqres two api calls to accomplish, | |
* one to retrieve the privded IP address's subnet ID, then to get all of the | |
* reverse DNS records for that subnet. | |
* | |
* This assumes the SoftLayer API PHP client | |
* <http://github.com/softlayer/softlayer-api-php-client> is installed in the | |
* directory '/SoftLayer' in this script's path and that you wish to use the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Retrieve a bandwidth graph for a single server. | |
* | |
* Retrieve a bandwidth graph for a single server for an arbitrary start and | |
* end date, specifying graph size and other graphing options. We can do this | |
* with two calls to the SoftLayer API. | |
* | |
* Counter data such as bandwidth counters and CCI resource use are stored in | |
* a server's metric tracking object. Our first call retrieves that server's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retrieve account VLAN and subnet information per server. | |
// | |
// Retrieve a list of all servers associated with a SoftLayer customer account | |
// and print a simple report detailing their VLANs and the subnets assigned to | |
// them. We do this with a call to the getHardare() method in the | |
// SoftLayer_Account API service using an object mask to retrieve the hardware, | |
// VLANs, VLANs' associated subnets and primary router records. See below for | |
// more details. | |
// | |
// Backend code to call the SoftLayer API was generated with the wsdl.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Order a control panel license for a virtual private server (VPS). | |
* | |
* Build a SoftLayer_Container_Product_Order_Software_Component_Virtual object | |
* for a new control panel license order and pass it to the | |
* SoftLayer_Product_Order API service to order it. See below for more details. | |
* | |
* This assumes the SoftLayer API PHP client | |
* <http://github.com/softlayer/softlayer-api-php-client> is installed in the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Order a new SoftLayer IP subnet | |
// | |
// Build a SoftLayer_Container_Product_Order_Network_Subnet object for a new IP | |
// subnet order and pass it to the SoftLayer_Product_Order API service to order | |
// it. See below for more details. | |
// | |
// Backend code to call the SoftLayer API was generated with the wsdl.exe | |
// utility: | |
// | |
// wsdl.exe /language:CS /out:"C:\path\to\project\SoftLayer_API.cs" /sharetypes http://api.service.softlayer.com/soap/v3/SoftLayer_Product_Order?wsdl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retrieve account VLAN and subnet information. | |
// | |
// Retrieve a list of all VLANs associated with a SoftLayer customer account | |
// and print a simple report detailing these VLANs and the subnets assigned to | |
// them. We do this with a call to the getNetworkVlans() method in the | |
// SoftLayer_Account API service using an object mask to retrieve the VLANs' | |
// associated subnets and primary router records. See below for more details. | |
// | |
// Backend code to call the SoftLayer API was generated with the wsdl.exe | |
// utility: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Order a monthly billed Bare Metal Computing instance. | |
// | |
// Build a SoftLayer_Container_Product_Order_Hardware_Server object for a new | |
// Bare Metal Cloud (BMC) order and pass it to the SoftLayer_Product_Order API | |
// service to order it. In this care we'll order a 4 core instance with 16G | |
// RAM, 1000mbit NICs, 2000GB bandwidth, a 250G SATA drive, Windows 2008 R2 | |
// Datacenter edition (64-bit) with Hyper-V, and default server order options. | |
// See below for more details. | |
// | |
// Backend code to call the SoftLayer API was generated with the wsdl.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Print a report containing a single server's details. | |
* | |
* Print a report for a single server containing: | |
* | |
* - id number | |
* - hostname | |
* - domain | |
* - notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Retrieve an account's next invoice information. | |
* | |
* This script retrieves the data presented in the SoftLayer Customer Portal's | |
* show next invoice page | |
* (https://manage.softlayer.com/Administrative/showNextInvoice) using a single | |
* API call. Next invoice information is retrieved from the billing items | |
* related to the servers and service you own with SoftLayer. It represents what | |
* is gauranteed to show on your next invoice, but doesn't represent one-time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Edit a server's basic information | |
* | |
* Change the notes property for a single server record to the sentence "This | |
* is my fastest server!" using the editObject() method in the | |
* SoftLayer_Hardware_Server API service. See below for more details. | |
* | |
* This assumes the SoftLayer API PHP client | |
* <http://github.com/softlayer/softlayer-api-php-client> is installed in the |