reportGetOpenForCountry
public static array reportGetOpenForCountry(string token,string emailID,string CountryCode)
Get the list of Regions of a country with there opent Count
Section
Report Related Methods

Parameters
string tokenA valid token for your account. To generate a token, use the login method.
string CountryCodeA valid code for the country

Returns
arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string country_nameRegion code for the country states
string country_regionState of the country
string openCountNumber of opens for the country region


Examples
download example code
xmlrpc_reportGetOpenForCountry.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10. $campaignList = $client->reportGet($token, "", 1, 100, "", "");
  11. $emailID=$campaignList[1]['id']
  12. $countryData=$client->reportGetOpenCountry($token,$emailID);
  13. $countryCode=$countryData[1]['country_region']
  14. $countryLists=$client->reportGetOpenForCountry($token,$emailID,$countryCode);
  15.  
  16. foreach($countryLists as $rec){
  17.     echo $rec['sequence'] . "] Country Region Code: " . $rec['country_name'] ;
  18.     echo "\t State: " . $rec['country_region'] . "\t Open Count: " . $rec['openCount'];
  19.     echo "<br />";
  20. }
  21.  
  22. ?>