04-22-2008, 01:36 AM
I am trying to use java to parse an e-mail address thus preventing bots from indexing it. I think this can be done with php as well. Am I going to have to do it with php to ensure that fools with default IE7 security settings won't get broken/missing links?
I am also using java to open new windows and IE is breaking that nicely too. Suggestions?
04-22-2008, 04:04 AM
are you using a java applet or jsp?
Also when you say that you are having java parse an email address what do you mean exactly? Someone is entering an email address and you're getting it?
04-22-2008, 02:36 PM
Instead of displaying the e-mail link in its entirety it is breaking it into sections and then concatenating it and printing on the page. This is being done to avoid web spiders harvesting the e-mails and spamming them.
04-22-2008, 05:09 PM
I am not very clear on your question....
String email = "firstname.lastname@example.org";
int divIndex = email.indexOf('@');
String emailP1 = email.substring(0, divIndex);
String emailP2 = email.substring(divIndex+1);
out.write(emailP1 + " at " + emailP2);