reportGetOpenForCountry
public static array reportGetOpenForCountry(string token,string emailID,string CountryCode)
Get the list of Regions of a country with there opent Count
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string CountryCode | A valid code for the country |
| Returns |
| array | Returns an array with the results. |
| Return Structure |
| integer sequence | The sequence number of the record |
| string country_name | Region code for the country states |
| string country_region | State of the country |
| string openCount | Number of opens for the country region |
- <?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']
- $countryData=$client->reportGetOpenCountry($token,$emailID);
- $countryCode=$countryData[1]['country_region']
- $countryLists=$client->reportGetOpenForCountry($token,$emailID,$countryCode);
-
- foreach($countryLists as $rec){
- echo $rec['sequence'] . "] Country Region Code: " . $rec['country_name'] ;
- echo "\t State: " . $rec['country_region'] . "\t Open Count: " . $rec['openCount'];
- echo "<br />";
- }
-
- ?>