ping(string apikey)
"Ping" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good. Note than unlike most all of our methods, we don't throw an Exception if we are having issues. You will simply receive a different string back that will explain our view on what is going on.
| Section | Helper |
|---|
| Parameters |
|---|
| apikey a valid API Key for your user account. Get by calling Get by visiting your API dashboard |
| Returns | |
|---|---|
| string | returns "Everything's Chimpy!" if everything is chimpy, otherwise returns an error message |
[1] xml-rpc_ping.php
<?php /** This Example shows how execute a ping and check the result 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.inc.php'; try { $result = $client->ping($apikey); if ($result == "Everything's Chimpy!"){ } else { } } catch (XML_RPC2_FaultException $e){ }