Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * spamsafeemail() - Purpose is to modifiy the email address to
- * hide it from website spiders which scan for emails for example to use
- * them for spam purpose.
- * @param mixed $email - the email address
- * @param string $at - replacement value for @
- * @param string $dot - replacement value for .
- * @return - the email returned example: myname[at]mail[dot]com
- */
- function spamsafeemail($email,$at = '[at]',$dot = '[dot]')
- {
- if(!empty($email))
- {
- if(strstr($email,'@') && strstr($email,'.'))
- {
- return str_replace('.',$dot,str_replace('@',$at,$email));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement