$apiKey = ''; $url = 'https://us14.api.mailchimp.com/3.0/lists/LIST_ID/members'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERPWD, 'user:' . $apiKey); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); $err = curl_error($ch); curl_close($ch); if ($err) { echo "cURL Error #:" . $err; } else { return $result; }