Skip to content

Instantly share code, notes, and snippets.

@catharsis96
Created August 15, 2017 10:51
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 catharsis96/5c7d971bfc856ecc58723556d961eeb7 to your computer and use it in GitHub Desktop.
Save catharsis96/5c7d971bfc856ecc58723556d961eeb7 to your computer and use it in GitHub Desktop.
<?php
require_once 'WindowsAzure.php';
use WindowsAzure\Common\ServicesBuilder;
try {
$connectionString = 'DefaultEndpointsProtocol=https;AccountName=account name;AccountKey=account key';
echo "1";
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);
echo "2";
} catch(ServiceException $e){
// Handle exception based on error codes and messages.
// Error codes and messages are here:
// http://msdn.microsoft.com/en-us/library/windowsazure/dd179446.aspx
$code = $e->getCode();
$error_message = $e->getMessage();
echo $code.": ".$error_message."<br />";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment