imageloop API - PHP language library
Before you can use the PHP language library, you must have generated an API-Key
for applications.
The WSDL file used in the build has been taken from
www.imageloop.com/soap/api/api.wsdl,
which referes to the XSD file
www.imageloop.com/soap/api/api.xsd.
Download
The PHP library can be downloaded here (version 3.1).
Documentation
The documentation is available in the zip file above.
Installation instructions
Unzip the distribution into your web-application folder. The distribution conatains the following subfolders:- il_api_php (the api-files)
- samples (some examples)
- doc (the phpDoc of the API)
Prerequisites
- First of all:
Get an "API key for standalone applications" from http://www.imageloop.com/api/keys.htm - Configuration:
The API supports two different transport-layers: SOAP and HTTP-RPC. You can select one of both. To select a transport-layer please configure the constant IL_TRANSPORT_SOAP. You can find the definition of this constant in the file called "il_preferences.php". In the above named file you can also change some other preferences and behaviour of the API. For more information read the phpDoc.
How to use
Some examples are in the "samples"-folder.<?php
// first of all you require a definition of a api-key, access-token, username and password:
define( "IL_APP_USER", "ansi3000" );
define( "IL_APP_PASSWORD", "123456" );
define( "IL_APP_API_KEY", "7e762d26-edf2-1e5d-86f7-001422b1aff2");
define( "IL_APP_ACCESS_TOKEN", "ansi3000rpc");
// in the next step you shuold include the following api-files:
require_once ('../il_api_php/il_preferences.php');
require_once ('../il_api_php/il_transport_http.php');
require_once ('../il_api_php/il_imagelooop_looop.php');
require_once ('../il_api_php/il_imagelooop_image.php');
require_once ('../il_api_php/il_imagelooop.php');
// initialize an instance of the main-class:
$il = & new ImageLooop();
// login to the imagelooopserver.
$loginRval = $il->login(IL_APP_USER, IL_APP_PASSWORD );
if( PEAR::isError($loginRval) ) {
// handle the problem
// ...
}
if( $loginRval === false ) {
// can't log in. handle the problem.
// ...
}
// get looops of the loged in user:
$looops = $il->getMyLooops();
if( PEAR::isError($looops) ) {
// handle this problem
}
echo( "<h2>My looops</h2>" );
foreach( $looops as $k => $looop ) {
echo( $k."] ".$looop->getName()."(access:".$looop->getAccessType().")<br>" );
}
?>
english
deutsch
français
español
italiano
türkçe