Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created September 10, 2012 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save underscorephil/3693506 to your computer and use it in GitHub Desktop.
Save underscorephil/3693506 to your computer and use it in GitHub Desktop.
Create Object Storage Client
function _getObjectStorageClient() {
$options = array('adapter' => ObjectStorage_Http_Client::SOCKET, 'timeout' => 10);
$host = 'https://dal05.objectstorage.softlayer.net'; // the SoftLayer Object Storage API host
$username = OBJSTOR_USER; // user name and password is display at https://manage.softlayer.com/ObjectStorage/index
$password = API_KEY;
return new ObjectStorage($host, $username, $password, $options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment