Код (Text): function checkMailruAuth($email, $password, $proxy = NULL) { $allowed_domains = array('mail.ru', 'inbox.ru', 'bk.ru', 'list.ru'); if($password == false) { $result = array('error'=>'1', 'email'=> $email, 'password'=> $password, 'status'=>'Не указан пароль'); return $result; } if($email == false) { $result = array('error'=>'2', 'email'=> $email, 'password'=> $password, 'status'=>'Не указан e-mail адрес'); return $result; } $split = explode('@', $email); if((count($split) == 1) || ($split == FALSE)) { $result = array('error'=>'2', 'email'=> $email, 'password'=> $password, 'status'=>'Не указан e-mail адрес'); return $result; } $domain_split = explode('.', $split[1]); $username = strtolower($split[0]); $domain = strtolower($domain_split[0]); if(!in_array(strtolower($split[1]), $allowed_domains)) { $result = array('error'=>'3', 'email'=> $email, 'password'=> $password, 'status'=>'Указан неизвестный домен '.strtolower($split[1])); return $result; } $data = array( 'login_from' => '', 'lang' => '', 'setLang' => '', 'Login' => $username, 'Domain' => $domain . '.ru', 'Password' => $password, 'level' => '1' ); $preg_mask = '/<meta http-equiv="refresh" content="0;url=(.*?)">/is'; $res = post('https://auth.mail.ru/cgi-bin/auth', $data, NULL, $proxy); $preg_res = preg_match($preg_mask, $res, $items); if (strpos($items[1], 'fail=1') !== false) { if (strpos($items[1], 'captcha=1') !== false) { $result = array('error'=>'5', 'email'=> $email, 'password'=> $password, 'status'=>'Указан неверный логин или пароль, CAPTCHA активирована'); return $result; } else { $result = array('error'=>'4', 'email'=> $email, 'password'=> $password, 'status'=>'Указан неверный логин или пароль'); return $result; } } if ($items[1] == 'https://e.mail.ru/cgi-bin/msglist?back=1') { $result = array('error'=>'0', 'email'=> $email, 'password'=> $password, 'status'=>'Вход выполнен'); return $result; } } Есть функциия, как мне задать проверку этой функции допустим $mail1="1" $mailpass="pass" Если майл и пасс верны то echo true если нет то false