Jump to content


Photo

[SOLVED] obfuscating e-mail addresses


  • Please log in to reply
5 replies to this topic

#1 charlieholder

charlieholder
  • Members
  • PipPipPip
  • Advanced Member
  • 1,419 posts
  • LocationAtlanta, GA

Posted 22 October 2006 - 09:19 PM

This is my very first post. I just joined this forum today. I've heard a lot about it so don't let me down!

I am very new to PHP. In fact, I just acquired my own hosting account and domain name about 2 weeks ago. I'm struggling through teaching myself and it's going very slow.

And now my question:
Is there a best practice was for obfuscating e-mail addresses in PHP or would something as simple as using ASCII be good enough to confuse spam crawlers?

PHP Manual | MySQL Reserved Words

Please mark TOPIC SOLVED when you've reached a solution.
Adding [code][/code] tags around your code increases your chances of receiving help.

I don't always test the code I write.


#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 22 October 2006 - 09:23 PM

You mean create random (unreal) email adresses?

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 22 October 2006 - 09:28 PM

The way I see it, there are 2 ways to do this. One is to use a contact form where your email address stays server-side, and the other is to use character entities. The safest imho is to use a contact form, that way your email address is never presented.

Character entities - http://www.ohlone.cc...ilencoding.html

#4 charlieholder

charlieholder
  • Members
  • PipPipPip
  • Advanced Member
  • 1,419 posts
  • LocationAtlanta, GA

Posted 22 October 2006 - 09:41 PM

The safest imho is to use a contact form, that way your email address is never presented.


WOuld that mean like creating a database to store my contact info and whenever I wanted to present it I would have to access the database, run a query for a certain row of data, and echo the result?

That's probably wrong. Because it would just display the text on the page and you could still grab it.

PHP Manual | MySQL Reserved Words

Please mark TOPIC SOLVED when you've reached a solution.
Adding [code][/code] tags around your code increases your chances of receiving help.

I don't always test the code I write.


#5 EngineeringGuy

EngineeringGuy
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationBakersfield, CA - 6 feet from Hell

Posted 22 October 2006 - 09:48 PM

I think he means something like this:

http://www.sms-lp.com/inforeq.php

That is something I made for my office. . Basically the script is sending the email and nobody (except for you) ever knows what address it goes to. 

(Please don't spam it too much as my secratary might get a little pissed =-D )

#6 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 22 October 2006 - 10:00 PM

Yeah that is one way to do it which will send the form to one or more email addresses which you provide in the mail script. Alternatively, you could also provide a drop down list of recipients, and then send the mail to the relevant recipient based on the value in the POST data to the mail script.

<?php

$recipient = $_POST['recipient_field'];

switch ($recipient) {

	default:
		//send email to webmaster
	break;

	case "person1":
		//send email to person1@somewhere.com
	break;
	
	case "person2":
		//send email to person2@somewhereelse.com
	break;

}

?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users