PHP code example of passworks / passworks-php

1. Go to this page and download the library: Download passworks/passworks-php 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/ */

    

passworks / passworks-php example snippets








assworks\Client;

// Instantiate the Passworks client
$api = new Passworks\Client('your api username', 'your api key');

// upload a asset (background image)
$api->createAsset('background', '/local-path-to-a-image/image.png');

// Fetch the asset list
$assets = $api->getAssets();

// Iterate through asset list
foreach($assets as $asset)
{
  print_r($asset);
}
javascript
{
    "ks/passworks-php": "2.0.0"
    }
}
shell
curl -sS https://getcomposer.org/installer | php
shell
php composer.phar install