Location: PHPKode > projects > php-opencloud > php-opencloud-master/samples/auth_ini.php
// (c)2012 Rackspace Hosting
// See COPYING for licensing information


define('INIFILE', 'auth.ini');

 * Load the .INI file into an associative array. The second parameter causes it
 * to store the various [sections] of the .ini file. In our example, the
 * [Identity] section contains the auth secret info.
$ini = parse_ini_file(INIFILE, TRUE);
if (!$ini) {
    printf("Unable to load .ini file [%s]\n", INIFILE);

// establish our credentials
$RAX = new OpenCloud\Rackspace(
    $ini['Identity']['url'], $ini['Identity']);
$compute = $RAX->Compute();
$serverlist = $compute->ServerList();
while($server = $serverlist->Next())
Return current item: php-opencloud