Встречал только один такой пример: http://2ip.ru/mail-checker/ Каким образом идёт определение существование почты, уведомлений и писем не шлёт, как ещё может определить? Как такой скрипт сделать ?
Как ввести в гугл запрос: check email exists php http://stackoverflow.com/questions/14448649/check-if-email-exist-php
Вам логику проверки или готовый скрипт? Если второе, то стоило создавать тему в разделе О работе, а если первое, то логика работы очевидна в вышеуказанном примере.
я не особо понял как он работает, допустим email был на mail.ru и его удалили, там есть переод в который его можно восстановить, зеригистрировать его повторно нельзя пока период не пройдёт , получается такой email не определить как несуществующий?
Проверка E-Mail на существование онлайн здесь показан скрипт и его код, скрипт работает нормально на их сайте, но когда ставлю их код, то у меня не проверяются те email которые у них определяются, что тут доделать нужно ? например hotmail не определяет и некоторые другие службы, а на их сайте и корпоративные емайлы показывает правильно PHP: <?php /* * This script was writed by Setec Astronomy - setec@freemail.it * * This script is distributed under the GPL License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * http://www.gnu.org/licenses/gpl.txt * */ define ('DEBUG_OK', true); class CCheckMail { var $timeout = 10; var $domain_rules = array ("aol.com", "bigfoot.com", "brain.net.pk", "breathemail.net", "compuserve.com", "dialnet.co.uk", "glocksoft.com", "home.com", "msn.com", "rocketmail.com", "uu.net", "yahoo.com", "yahoo.de"); function _is_valid_email ($email = "") { return preg_match('/^[.\w-]+@([\w-]+\.)+[a-zA-Z]{2,6}$/', $email); } function _check_domain_rules ($domain = "") { return in_array (strtolower ($domain), $this->domain_rules); } function execute ($email = ""){ if (!$this->_is_valid_email ($email)) return false; $host = substr (strstr ($email, '@'), 1); if ($this->_check_domain_rules ($host)) return false; $host .= "."; if (getmxrr ($host, $mxhosts[0], $mxhosts[1]) == true) array_multisort ($mxhosts[1], $mxhosts[0]); else { $mxhosts[0] = $host; $mxhosts[1] = 10; } if (DEBUG_OK) print_r ($mxhosts); $port = 25; $localhost = $_SERVER['HTTP_HOST']; $sender = 'info@' . $localhost; $result = false; $id = 0; while (!$result && $id < count ($mxhosts[0])) { if (function_exists ("fsockopen")) { if (DEBUG_OK) print_r ($id . " " . $mxhosts[0][$id]); if ($connection = fsockopen ($mxhosts[0][$id], $port, $errno, $error, $this->timeout)) { fputs ($connection,"HELO $localhost\r\n"); // 250 $data = fgets ($connection,1024); $response = substr ($data,0,1); if (DEBUG_OK) print_r ($data); if ($response == '2') // 200, 250 etc. { fputs ($connection,"MAIL FROM:<$sender>\r\n"); $data = fgets($connection,1024); $response = substr ($data,0,1); if (DEBUG_OK) print_r ($data); if ($response == '2') // 200, 250 etc. { fputs ($connection,"RCPT TO:<$email>\r\n"); $data = fgets($connection,1024); $response = substr ($data,0,1); if (DEBUG_OK) print_r ($data); if ($response == '2') // 200, 250 etc. { fputs ($connection,"data\r\n"); $data = fgets($connection,1024); $response = substr ($data,0,1); if (DEBUG_OK) print_r ($data); if ($response == '2') // 200, 250 etc. { $result = true; } } } } fputs ($connection,"QUIT\r\n"); fclose ($connection); if ($result) return true; } } else break; $id++; } //while return false; } } $str='vasya@mail.ru'; $alter=new CCheckMail (); print "E-mail: ".$str." - ".($alter->execute($str)?'существует':'не существует'); ?>