First post so I thought I would make it an interesting one. I was using a javascript to cloak my members email addresses on our members page to hide them from email harvesters. I am currently changing the site over to a php, MySQL site and have run into a problem with this cloaking method. I have been using the following js to cloak the emails:
Email: <SCRIPT LANGUAGE="JavaScript">
user = "username";
site = "domain";
document.write('<a href=\"mailto:' + user + '@' + site + '\">');
document.write(user + '@' + site + '</a>');
</SCRIPT>
The result is:
Email: username@domain
This works great however I can't figure out how to even start to create an effect like this when using data from the database. Is it even possible to cloak an email address with php and MySQL within a string of Print commands?
PHP just sends the content so using miltiple print's or echo's won't do a thing. You could try translating the characters into HTML "numbers" (whatta you call em?). Like an @ would turn into &# 64.