PHP code example of outcompute / cloudmetadata

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

    

outcompute / cloudmetadata example snippets




Object = new OutCompute\CloudMetaData\MetaData();
$metaData = $metaObject->get();
var_export($metaData);


e = OutCompute\CloudMetaData\CacheFactory::factory('File');
$cache->directory = dirname(__FILE__);
$metaObject = new OutCompute\CloudMetaData\MetaData($cache);
$metaData = $metaObject->get('json');
var_export($metaData);


Object = new OutCompute\CloudMetaData\MetaData();
$metaData = $metaObject->get('json', 'basic.json');
var_export($metaData);