reportGetOpenCountry
public static array reportGetOpenCountry(string token,string emailID )
Get the list of Countries with there region code and opent Count
Parameters
|
string token | A valid token for your account. To generate a token, use the login method. |
string emailID | A valid email ID of which you want the Country wise Opent report |
Returns |
array | Returns an array with the results. |
Return Structure |
integer sequence | The sequence number of the record |
string country_name | Name of the country |
string country_region | Code for the Country |
string openCount | Number of opens for the country |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
- $campaignList = $client->reportGet($token, "", 1, 100, "", "");
- $emailID=$campaignList[1]['id']
- $countryLists=$client->reportGetOpenCountry($token,$emailID);
-
- foreach($countryLists as $rec){
- echo $rec['sequence'] . "] Country Name: " . $rec['country_name'] ;
- echo "\t Country Code: " . $rec['country_region'] . "\t Open Count: " . $rec['openCount'];
- echo "<br />";
- }
-
- ?>