View Full Version : I.E. Messing my simple script's day up!
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 = "email@example.com";
int divIndex = email.indexOf('@');
String emailP1 = email.substring(0, divIndex);
String emailP2 = email.substring(divIndex+1);
out.write(emailP1 + " at " + emailP2);
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.