Skip to content

Commit

Permalink
Replaced ereg functions with preg_match
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 16, 2014
1 parent d6477ca commit 919f7e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions verify.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function verifyEmail($toemail, $fromemail, $getdetails = false){

$connect = @fsockopen($mx_ip, 25);
if($connect){
if(ereg("^220", $out = fgets($connect, 1024))){
if(preg_match("/^220/i", $out = fgets($connect, 1024))){
fputs ($connect , "HELO $mx_ip\r\n");
$out = fgets ($connect, 1024);
$details .= $out."\n";
Expand All @@ -57,7 +57,7 @@ function verifyEmail($toemail, $fromemail, $getdetails = false){
fputs ($connect , "QUIT");
fclose($connect);

if(!ereg("^250", $from) || !ereg("^250", $to)){
if(!preg_match("/^250/i", $from) || !preg_match("/^250/i", $to)){
$result = "invalid";
}
else{
Expand Down

0 comments on commit 919f7e3

Please sign in to comment.