reportGetOpenCountry
public static array reportGetOpenCountry(string token,string emailID )
Get the list of Countries with there region code and opent Count
Section
Report Related Methods

Parameters
string tokenA valid token for your account. To generate a token, use the login method.
string emailIDA valid email ID of which you want the Country wise Opent report

Returns
arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string country_nameName of the country
string country_regionCode for the Country
string openCountNumber of opens for the country


Examples
download example code
xmlrpc_reportGetOpenCountry.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. $countryLists=$client->reportGetOpenCountry($token,$emailID);
  13.  
  14. foreach($countryLists as $rec){
  15.     echo $rec['sequence'] . "] Country Name: " . $rec['country_name'] ;
  16.     echo "\t Country Code: " . $rec['country_region'] . "\t Open Count: " . $rec['openCount'];
  17.     echo "<br />";
  18. }
  19.  
  20. ?>