Mailchimp Api用户通过php检查

I am trying to check if an e-mail address a user enters already is in the list of subscribers or not.

This is what I have tried so far:

<?php
$apikey = 'apikey';
$list_id = 'listid';
$chunk_size = 4096; //in bytes
$url = 'http://us14.api.mailchimp.com/export/1.0/list?apikey='.$apikey.'&id='.$list_id;

/** a more robust client can be built using fsockopen **/
$handle = @fopen($url,'r');
if (!$handle) {
  echo "failed to access url
";
} else {
  $i = 0;
  $header = array();
  while (!feof($handle)) {
    $buffer = fgets($handle, $chunk_size);
    if (trim($buffer)!=''){
      $obj = json_decode($buffer);
      if ($i==0){
        //store the header row
        $header = $obj;
      } else {
        //echo, write to a file, queue a job, etc.
        echo $obj[0];
      }
      $i++;
    }
  }
  fclose($handle);
}
?>

This will return all email subscribers. I am trying to narrow it down to the specific e-mail the user entered, but I am stuck and don't know how to do it?

/** a more robust client can be built using fsockopen **/
$handle = @fopen($url,'r');
if (!$handle) {
  echo "failed to access url
";
} else {
  $i = 0;
  $header = array();
  while (!feof($handle)) {
    $buffer = fgets($handle, $chunk_size);
    if (trim($buffer)!=''){
      $obj = json_decode($buffer);
      if ($i==0){
        //store the header row
        $header = $obj;
      } else {
        //echo, write to a file, queue a job, etc.
        if ($obj[0] == "myemail@gmail.com") { echo "XXXXXXX";} else { }
      }
      $i++;
    }
  }
  fclose($handle);
}
?>