function app_get_emails($email, $psw, $type) { $temp = explode('@', $email); $name = array_shift($temp); $domain = array_shift($temp); if ($type == 'email') { include_once dirname(__FILE__) . '/lib/mailfactory.php'; switch (strtolower($domain)) { case "126.com": $contact = new MailFactory(M126); break; case "sina.com": $contact = new MailFactory(MSINA); break; case "tom.com": $contact = new MailFactory(MTOM); break; case "gmail.com": $contact = new MailFactory(MGOOGLE); break; case "163.com": $contact = new MailFactory(M163); break; case "sohu.com": $name = $email; $contact = new MailFactory(MSOHU); break; case "vip.sohu.com": $name = $email; $contact = new MailFactory(MSOHU_VIP); break; case "yahoo.cn": case "yahoo.com": case "yahoo.com.cn": $name = $email; $contact = new MailFactory(MYAHOO); break; default: die("error"); } return $contact->getContactList($name, $psw); } elseif (strtolower($type) == 'msn') { include_once dirname(__FILE__) . '/lib/msn.class.php'; $return = array(); $msn2 = new msn(); $return_emails = $msn2->qGrab($email, $psw); if ($return_emails && is_array($return_emails)) { foreach ($return_emails as $v) { $return[] = $v[0]; } } return $return; } }
$contact = new MailFactory(MSOHU); break; case "vip.sohu.com": $_POST['account'] = $_POST['account'] . "@" . $_POST['postoffice']; $contact = new MailFactory(MSOHU_VIP); break; case "yahoo.cn": case "yahoo.com": case "yahoo.com.cn": $_POST['account'] = $_POST['account'] . "@" . $_POST['postoffice']; $contact = new MailFactory(MYAHOO); break; default: die("error"); } $contacts = $contact->getContactList($_POST['account'], $_POST['passwd']); if ($contacts == 0) { die('error'); } if (empty($contacts)) { die('empty'); } if ($_POST['postoffice'] == "sina.com" || $_POST['postoffice'] == "sohu.com" || $_POST['postoffice'] == "vip.sohu.com") { echo diff_contacts($contacts); } else { echo diff_contacts(array_flip($contacts)); } exit; } elseif ($act == "m") { if (!$_POST['account'] || !$_POST['passwd']) { die('error');