Retrieving lists of areas

<?php/**
* This example will produce a list of the counties in Ireland.
*/$DaftAPI=new SoapClient("http://api.daft.ie/v2/wsdl.xml");$parameters=array('api_key'=>"4039260_invalid_example_key_87b7c7c267fa",'area_type'=>"county");$response=$DaftAPI->areas($parameters);foreach($response->areasas$county){print"{$county->name}<br />\n";}?>

The response fetched by this code should have the following structure:

<?php/**
* This example will produce a list of small areas in Co. Dublin, with
* a count of how many 'sale' properties are in each.
*/$DaftAPI=new SoapClient("http://api.daft.ie/v2/wsdl.xml");$parameters=array('api_key'=>"4039260_invalid_example_key_87b7c7c267fa",'area_type'=>"area",'county'=>array(1),'ad_type'=>'sale');$response=$DaftAPI->areas($parameters);foreach($response->areasas$area){print"{$area->name}<br />\n";}?>

The response fetched by this code should have the following structure:

Retrieving lists of property types

<?php/**
* This example will dump all of all valid ad_types.
* Note that not all of these ad types are supported by the Daft API.
*/$DaftAPI=new SoapClient("http://api.daft.ie/v2/wsdl.xml");$parameters=array('api_key'=>"4039260_invalid_example_key_87b7c7c267fa",'ad_type'=>"sale");$response=$DaftAPI->property_types($parameters);foreach($response->property_typesas$property_type){print"{$property_type->name}<br />\n";}?>

The response fetched by this code should have the following structure:

Retrieving lists of property 'features'

<?php/*
* This example will list all the features for 'rental' ads.
* Note that the 'features' request has no meaning for 'sale'
* ads. See the full documentation for details.
*/$DaftAPI=new SoapClient("http://api.daft.ie/v2/wsdl.xml");$parameters=array('api_key'=>"4039260_invalid_example_key_87b7c7c267fa",'ad_type'=>"rental");$response=$DaftAPI->features($parameters);foreach($response->featuresas$feature){print"{$feature->name}<br />\n";}?>

The response fetched by this code should have the following structure: