[제로] 서버OS가 WindowsNT일경우 가입폼에서 메일체크 에러방지
페이지 정보
루루아빠
2,969 1
2005.07.07 14:54:17
짧은주소
-
https://yadolee.com/tip/53 주소복사
본문
setup.php파일 42째줄
; E-Mail 의 MX를 검사하여 허위 E-Mail인지 검사 ( true : 허위 E-Mail 검사, false : 검사안함)
check_email = true <- 요기
하신 분만 보세요...
lib.php파일 859째줄
function mail_mx_check($email) {
if(!ismail($email)) return false;
list($user, $host) = explode("@", $email);
if (checkdnsrr($host, "MX") or checkdnsrr($host, "A")) return true;
else return false;
}
을
function mail_mx_check($email) {
if(!ismail($email)) return false;
list($user, $host) = explode("@", $email);
if ($_ENV["OS"]=="Windows_NT") {
$function = "checkdnsrr_winNT";
} else {
$function = "checkdnsrr";
}
if ($function($host, "MX") or $function($host, "A")) return true;
else return false;
}
으로 바꾸고
그 밑에
function checkdnsrr_winNT( $host, $type = '' )
{
if( !empty( $host ) )
{
# Set Default Type:
if( $type == '' ) $type = "MX";
@exec( "nslookup -type=$type $host", $output );
while( list( $k, $line ) = each( $output ) )
{
# Valid records begin with host name:
if( eregi( "^$host", $line ) )
{
# record found:
return true;
}
}
return false;
}
}
추천인
Progress Bar 16.26%
최신댓글이 없습니다.



댓글1
야돌이님의 댓글