I want to encode an email address into its corresponding character codes, so when it is printed the char codes are interpreted by the browser, but the robots get the encoded string instead of the interpreted one.
For example (1):
abc@abc.com
should be sent to the browser as (2) (whitespaces added so the browser shows it):
a ;b ;c ;@ ;a ;b ;c ;. ;c ;o ;m ;
so the human reads (1) and web robots read(2)
There should be an easy function or way to do this, but cannot find one.
Found at:
http://php.net/manual/en/function.htmlentities.php