The examples here demonstrate some of the basic functionalities of the Azure PHP SDK.
-
Download composer.phar to the examples directory
-
Create a file named composer.json in the examples directory and add the following code to it:
{ "require": { "microsoft/windowsazure": "^0.4" } }
-
Open a command prompt and execute this in the examples directory
php composer.phar install
This will download all dependencies to the vendor sub directory.
-
Open tasklist\userconfig.php, enter you Azure subscription Id and the full path to your .pem cert file. see https://azure.microsoft.com/en-us/blog/introducing-the-windows-azure-service-management-api/ for details on certificates.
-
In the example directory, run
php -S localhost:8000
-
In a browser, navigate to
http://localhost:8000/tasklist/index.php
.
-
Open MediaServices\userconfig.php, enter "Media Service Account Name" and "Primary Media Service access key" for your Media Service from the Azure portal.
-
In the examples directory, run
php MediaServices\%sample_name%.php
-
Install Fiddler.
-
Set the
HTTP_PROXY
andHTTPS_PROXY
enviroment variables tolocalhost:8888
. For exampleset HTTP_PROXY=localhost:8888 set HTTPS_PROXY=localhost:8888
-
Start your program.