/** * AdClip, Classified Ads * http://www.adclip.com * * Example files AdClipWebServiceWrapper * * PHP version 5 * * LICENSE INFO: * * @category WebServices * @author AdClip * @date 2009/08 * @copyright 2009 AdClip * @license http://www.adclip.com/api * */ //get the Wrapper class, our API Code you can use to interface with the Web Service //with a few lines of code! require 'wrapper/AdClipWebServiceWrapper.php'; //Create the object required to interface with the web service API //This is what makes possible transparent calls to the AdClip API $AdClipWebServiceWrapperObject = new AdClipWebServiceWrapper( "http://testing.webservices.adclip.com/wsadclip.asmx?WSDL", /* URL Of Web Service*/ "", /* Your AdClip User*/ "", /* Your AdClip Password*/ true, /* Soap Authentication (true,false)*/ false/* Xml Results (true,false) */ ); /** * Example Usage 1 * AdClipGetCountriesList */ $result = $AdClipWebServiceWrapperObject->AdClipGetCountriesList("",""); show_results("Country List",$AdClipWebServiceWrapperObject,$result); /** * Example Usage 2 * AdClipGetCountriesList */ $result = $AdClipWebServiceWrapperObject->AdClipGetCategoriesList("","","194" /*Country ID Code*/); show_results("Category List",$AdClipWebServiceWrapperObject,$result); /** * Example Usage 3 * AdClipGetCountriesList */ $result = $AdClipWebServiceWrapperObject->AdClipGetCategoryFields("","","194" /*Country ID*/,"1" /*Category ID*/,"en-US" /*language*/); show_results("Category Fields List",$AdClipWebServiceWrapperObject,$result); /** * Example Usage 4 * AdClipGetData */ $result = $AdClipWebServiceWrapperObject->AdClipGetData("","","194" /*Country ID*/,"1" /*ID Field*/,"1" /*idFather*/,"en-US" /*language*/); show_results("Get Data",$AdClipWebServiceWrapperObject,$result); /** * Example Usage 5 * AdClipGetLanguagesList */ $result = $AdClipWebServiceWrapperObject->AdClipGetLanguagesList("","","en-US" /*language*/); show_results("Languages List",$AdClipWebServiceWrapperObject,$result); /** * Example Usage 6 * AdClipGetTimezones */ $result = $AdClipWebServiceWrapperObject->AdClipGetTimezones("","","en-US" /*language*/); show_results("Timezones List",$AdClipWebServiceWrapperObject,$result); /* * Just a simple function to output the results of the method invocation * to AdClip Web Service */ function show_results($title,$AdClipWebServiceWrapperObject,$result){ echo "
".$title."
"; if (!($AdClipWebServiceWrapperObject->failure)){ //Do some error handling, check if not failure print_r($result); } else //get error description echo $AdClipWebServiceWrapperObject->reason; echo "
"; }