본문 바로가기
메인메뉴 바로가기
푸터 바로가기
통합검색
웹개발
PHP
JavaScript
Jquery
REGEX
DataBase
MySql
mariaDB
Linux
INFO
네이버검색API
통합검색
BookMark
BLOG
여행사진
서울시
경기도
강원도
충청도
전라도
경상도
제주도
해외여행
광안대교 일출
광안대교 야경
꽃지해변 일몰
보라카이
광안대교 일몰
PHP
Encode email
조회수
3,336
작성일
2009-09-01
function encode_email($e)
{
for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; }
return $output;
}
echo
(encode_email(
'user@davidwalsh.name'
));
Comment
2009-10-14 13:50
참조사이트 :
http://davidwalsh.name/php-email-encode-prevent-spam
Comment
2010-03-01 18:10
// email 주소 일부 암호화
function encode_mail_form($email, $encode_count=2, $fields='*')
{
$mail=explode("@",$email);
$email=substr($mail[0],0,$encode_count).str_repeat($fields,strlen($mail[0]))."@".$mail[1];
return $email;
}
이전글
strpos — 문자열이 처음 나타나는 위치를 찾습니다
다음글
function_exists — Return TRUE if the given function has been defined
목록으로