PHP code example of microsoft / azure-storage-blob

1. Go to this page and download the library: Download microsoft/azure-storage-blob library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

microsoft / azure-storage-blob example snippets




use MicrosoftAzure\Storage\Blob\BlobRestProxy;

use MicrosoftAzure\Storage\Common\ServiceException;

$blobClient = BlobRestProxy::createBlobService($connectionString);

$blobClient = BlobRestProxy::createBlobServiceWithTokenCredential($token, $connectionString);

$blobClient = BlobRestProxy::createBlobService(
    $connectionString,
    $optionsWithMiddlewares
);

        $options["http"] = ["verify" => "<absolute path to cacert.pem>"];
        BlobRestProxy::createBlobService($connectionString, $options);
        

git clone https://github.com/Azure/azure-storage-php.git
cd ./azure-storage-php

php composer.phar install