Jul 19, 2008

Encode Your Email Address - Confuse the Spam Bots, but not your viewing clients

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Encode Your Email Address - Confuse the Spam Bots, but not your viewing clients

jlhaslip
Spam bots often 'scrape' pages to glean information and collect email addresses. I don't like that.
To combat the Bots from collecting my address off of my site, I wrote a script that includes 'obscures' the address in several ways.

It adds 'AT' where the '@' sign is and then replaces the '.' with 'DOT' so it is humanly readable, but not by the Bots.
Also, it encodes the 'mailto' and the address used in the 'mailto' so it shows okay on the web page and on:hover, but it is actually encode into hex values on the page. Sort of like Html Entities, which 'most' Bots cannot read. But they are becoming smarter all the time, so there is no guarantee that this will work all the time for all Bots..

The demo site can be used to create the obfuscated (Whew, big word!) link tag for use on your own site if you are new to Web site building and do not yet feel comfortable with coding php or templates..

Experienced Developers/Coders can download the core components from here. Three functions. I wrote the functions so the code would be re-usable for other tasks.

One function replaces the '@' and '.'.
The other one is a generic string encoding function. It could also be used to encode code snippets on your pages, too... biggrin.gif

 

 

 


Reply

shadowx
Nice bit of code there!

nowadays whenever i make a contact page i always use a PHP MAIL command to hide the address and i avoid writing my email address anywhere on the net too but it can be useful to create MAILTO links and this is a good way of protecting them

When making a website for a relative they needed a contact page and wanted an image link with a MAILTO so i may very well end up using this little snippet if thats ok with you?

Im more than happy to put a mention in the source code but as its for a paying client im reluctant to have a user-visible mark. Of course my use of the code is up to your discretion smile.gif

Reply

jlhaslip
I have a version which produces an Image link, too. The Image can get created dynamically, or from a saved file if it is available, but there is a problem with accessing the Fonts here on the Trap, so I didn't post that one.

If you need the code for the Image-based version, PM a request. It works fine on my localhost (XAMPP) installation. If you have GD with T1Lib installed, which a standard XAMPP does, it will likely work on your machine.

And all of my stuff is Licenced under the Creative Commons - attributtion - share-alike standards, so, yes, you may borrow the code. Simply retain the copyright in the script and pass it on. Whether you alter the code or not, the copyright needs to follow it.

A link-back is not required, but that would be nice. smile.gif

Reply

shadowx
QUOTE
And all of my stuff is Licensed under the Creative Commons - attribution - share-alike standards, so, yes, you may borrow the code. Simply retain the copyright in the script and pass it on. Whether you alter the code or not, the copyright needs to follow it.


Good news then! The copyright will follow it if i do indeed use this code. I wont put a link back thats visible because this website is for a paying client but if i use the code on any of my websites then i will definitely have a link back, i hope you dont mind that smile.gif

I wont bother with the image code as im not a fan of using the GD library and image manipulation in PHP as its a bit too object orientated for me, but one day i will branch into OO PHP

Thanks for letting me and everyone else use the code, im sure it will be very useful

Reply

jlhaslip
*UPDATED OCT 16/2007*

Fixes:
1.) Corrected the Download Link - removed an extra character in "iindex"
2.) Corrected the default email address displayed - removed a trailing 'a'
3.) Added additional check for bad User input - function to clean some bad stuff
4.) Converts html entities - again, a security issue

That should do it for now. Let me know if you have any difficulties with the script.

Thanks.

*UPDATED OCT 17/2007*

Fixes:

5.) Fixed validation of "&'s"in the Trap link
6.) Corrected Licence link to Creative Commons

Reply

jimmie32
I Encoded like this:

myname[dot]32[at]gmail[dot]com

But there is a another way, like:

Before: myname.32@gmail.com
After: NOSPAM---myname.32@gmail.com

Adding NOSPAM is great too.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : encode, email, address, confuse, spam, bots, viewing, clients

  1. My Hosting Request Email... [resolved]
    (3)
  2. How To Disable Firefox's Awesome Bar
    restore old location/address bar from firefox 2 (7)
    How To Disable Firefox's Awesome Bar Many people are struggling to find the benefits of
    the so-called Awesome Bar as one member so truthfully pointed out , the smart tag makes your
    viewing "illicit" sites more obvious, particularly when people are peering over as you're typing
    keywords in /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />
    Anyway, for those of us who are too lazy to clear their history at the appropriate times, there are
    two steps to disabling its function entirely: Type about:config into the locat....
  3. Halliluya! I'm Either Rich....
    ...or it's an email scam! Guess which... (0)
    Just received this in my email. Wow! I'm----the----luckiest----guy---on---earth. ~Sob sob~
    QUOTE FROM THE DESK OF MR ABUDU HASSAN BILLS AND EXCHANGE MANAGER, BANK OF AFRICA (B.O.A)
    OUAGADOUGOU-BURKINA FASO. WEST AFRICA DEAR FRIEND I am the manager of bill and exchange at the
    foreign remittance department BANK OF AFrica (B.O.A) here in Ouagadougou, Burkina Faso. In my
    department we discovered an abandoned sum of US$10.5m (TEN MILLION FIVE HUNDRED THOUSANDS US
    DOLLAR) in an account that belongs to one of our foreign customer (MR. ANDREAS SCHRANNER from M....
  4. Spammers Using My Domain To Send Spam
    (2)
    OMG ok, so i logged into my gmail account and shabam, 400 new messages, 100 to my inbox 300marked as
    spam, turns out some kind of sex pill or something company is using the email
    randomname@have-heart.net to spam people, since i have all my email accounts pointed to my gmail
    adress.... heres a copy of one of the spam messages i received back QUOTE ----- The
    following addresses had permanent fatal errors ----- (reason: 550 5.1.1 ... User unknown)
    ----- Transcript of session follows ----- ... while talking to pop3.ymail.net.: >>> DATA ... User
    unknown 550....
  5. Form Not Returning Correct Email Address
    (5)
    I have just noticed another side effect of the recent server migration. On my web site I have a
    comment form. After filling in the form the user gets a confirmation email and I get an email to
    tell me someone filled in the form, and showing me the data that were filled in. First of all, I
    got all emails twice, but I think I managed to fix that in the PHP code. What is worse, though, the
    user still gets his/her confirmation and thank you email, but, instead of my email address, the
    From: field now gives an aaddress on the server my account is on, ie. the gamma server. D....
  6. Google Can Send Spam
    Gmail can be used as a Spam Bazooka (2)
    For those who are so loyal to Page and Brin that they can't let go of their Gmail accounts.
    I've got some news for you. QUOTE INSERT, the Information Security Research Team, has
    sucessfully created a proof of concept exploiting the “trust hierarchy” that exists
    between mail service providers. Taking advantage of the way Gmail forwards messages, the team was
    able to send 4000 messages in a short period of time from a single account without any
    countermeasures taken by Google. Using Google as an open email relay is highly desierable for
    spammers ....
  7. Problem With My Email : [urgent]
    Can't send or receive email. (1)
    Hi, I'm having a serious problem. I had a mail account set up through my Cpanel. My site is
    zoebelkin.co.cc and my mail server is mail.zoebelkin.co.cc!!! The mail account which
    I'm talking about is admin@zoebelkin.co.cc But for a week I was not getting mail. Now
    that's wierd cause I get something around 10 mails daily. I then sent a mail from one of my
    other mail id at other mail host whose address is dave2@bluebottle.com just for testing my server.
    But the message didn't ever reach my mail server. I sent many other mails from some other mai....
  8. Spam Is 30 Years Old May 3, 2008
    Come celebrate the birthday of the very first SPAM email (10)
    According to this article 393 ARPANET employees in 1978 received the very first SPAM email from
    DEC. Since then we've all grown to know and love SPAM in all of its flavors. I say we should
    make this a International Holiday and drink a beer in rememberance of that very first little
    SPAMalita that started it all back when The Rockford Files was entertaining us nightly and Jimmy
    Carter was messing up the Middle East. I think that was Carter's term... Anyway, here's the
    article in its entirety in case the above link doesn't always work: QUOTE Dublin, ....
  9. How To Find New Ip Address
    (12)
    Since the server change, my site, pandoratreasures.com doesn't load. My old IP address was
    64.69.36.223 The email about the change said: Where Do I Find The New Ip Addresses ?
    =============================== The list of main shared ip are given here :- Servername : Old IP :
    New IP there was no link. Can someone point me to the right location? Thanks. ....
  10. Paypal Email
    where can i find my paypal email? HELP anyone (3)
    Hi guys Im quite confused with the way paypal works. i know that i can pay other people thats easy
    to me.. but how do people pay me? for example, there is a site that pays people to search stuff
    using their search engine.. but the payment details you have to provide for paypal is your paypal
    email address. do they mean like the email address you used to sign up to paypal? or do you get a
    paypal email address when you sign up? any one know? let me know thanks really need the help....
  11. Way To Make Money Without Spam
    (5)
    It's cliche I'm sure, and I'm fine if people flame or get upset by it, but this is
    something that I've used to help pay for my past MMOs/games/dvds/pcupgrades before. This is a
    revamped version that doesn't give you the nasty pop-ups, or any spyware of the sort (I've
    checked it out, but feel free to check for yourself) It doesn't earn you that much, only a penny
    per click but over time and if you get friends to help you, it really does add up. With so many
    people waiting for some new games/videos to come out, I decided to start it up again a....
  12. Can You Suggest A Good Free Email Server To Download?
    (2)
    Howdy, almost in response to my post about IMAP and PHP:
    http://www.trap17.com/forums/php-imap-read...elp-t56913.html (i still need help with this so please
    if you have experience in PHP and accessing emails using PHP help!) Im thinking i need a new
    mail server to rule out the possibility it could be my current mail server. Now currently im using
    the mail server that comes with the XAMPP package, the mail server is mercury32 version 4.something
    i know it supports the IMAP protocol because the docs say so and it has configs for IMAP. Ive messed
    around with it and ....
  13. Auto-delete Your Spam In Gmail
    finally, get rid of all that spam! (15)
    i have been using gmail for quite a while, and have always hated hotmail. i hate it now more than
    ever now that it is 'windows live mail'. however, there has always been something about
    gmail that bugs me: how on earth do i get rid of all that spam? i mean, doesn't it ever bug you
    when you have 3 new messages in your inbox, and then 56 bits of spam? and then you have to manually
    head to the spam folder, and delete them all? i know gmail offer you a lot of space and i know the
    spam messages get deleted after 30 days, but for me it is a phsychological thing: i....
  14. Unable To Renew Ip Address Or Connect To Internet After Broadband Software Uninstall
    issues after removing DSL software (6)
    How many of you experienced this? QUOTE Unable to renew IP address Unable to start RPC service
    You invite a broadband service, i.e. Verizon DSL, and they provide you with an installation disk.
    You gladly use it but later you add LAN to your home and decide to add a router. You follow the
    manufacturer's instruction and set up your home network. But this is strange... the computer you
    were able to connect to the internet just before a home network is now cannot connect to the
    internet. And according to the router manual you installed the program correctly but ....
  15. Free Email Service
    I am looking to start a free Email service (7)
    So i find my self sitting at my server, looking at whats been going on lately. Then i notice that at
    one point in time i was offering Email and i thought to myself "You know what? I could really
    attract some people if i started that again!", but there was one problem in my way! I dont
    want to host this service on my server, i want it to be hosted remotely. I also want it to be free.
    So here is what im looking for: A website that offers user@mydomainname.com email service At least
    1GB per mail box guaranteed 24/7 access $0.00 price If anyone knows of such a s....
  16. Send Fake Sms From Your Nokia Phone
    sending SMS with your own From address (14)
    Sending Fake SMS There is a loop hole in Nokia mobile phone using which you can send fake
    SMS messages. i.e you can send a SMS to your friend by changing the from address to some random
    e-mail address. Nokia has a feature called SMS e-mail This feature is used to send e-mail by
    SMS. You network operator will have a SMS e-mail server. You are supposed to send a SMS to the SMS
    mail server with the To address, subject and e-mail body as a partof the SMS text body by following
    the conventions provideded by your Network operator. You SMS server will read the To....
  17. Email For My Members
    (6)
    Dose any one know where i can get a free email serves to offer to my website members. I would like
    it to be remotley hosted. I would also like it to be username@mydomain.com. I would like a free
    service. I can deal with a pay one as long as it is not on $20 a month. Silent Shadow
    www.zoneender.blogspot.com ....
  18. Does Gmail Have Too Much Spam Emails?
    Vote! (40)
    Do you think gmail gives too much spam? I have been a member of gmail for a month now and I have
    about 200 spam emails! Do, do YOU think they give too much spam? VOTE!....
  19. How To Get New Ip Address
    Request a new IP address from your ISP server. (12)
    Request a new IP address from your ISP server Here's how to do it in windows Sorry for all
    you MAC user's /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
    Step 1, Click Start step 2, Click run step 3, In the run box type cmd.exe and click OK step 4,
    When the command prompt opens type the following.PRESS ENTER after each new line. ipconfig
    /flushdns *Press enter * ipconfig /release *Press enter * ipconfig /renew *Press enter * exit *press
    enter * If you pplz are still have mess ups with this ill make a video TUT .. or if you....
  20. Time Viewing
    (14)
    Einstein once proved time travel impossible but never said anything about time viewing i bielive so
    i posted this to see if anyone has opinions i can feed off of about either a)do you think time
    viewing will ever be possible and if so your theory or b)do you not agree with Einstein and think
    time travel wil one day be possible and if so your theory....
  21. Get 30 Gb Email For Free
    let us talk about , email system for huge data ! (30)
    Friends here we are talking about largest email, free System http://www.30gigs.com this one is
    good and can handel many file at a time. plz let me know any one having this type of information
    ! Also for small user www.walla.com is good one....
  22. What Messenger/email Service Do You Use?
    (90)
    I went with gmail when the hype began. Nice inbox size, and it's brilliant if all you want is a
    good email service. However, I switched back to hotmail simply because of it's MSN
    compatibility. MSN is still the best instant messenger, IMO. Highly doubt I'll be using whatever
    gmail is gonna come up with. MSN has climbed so high above the other clients that I believe it
    won't go down without a fight Anyhoo, what does everyone else use? Hotmail? Yahoo? Gmail? ISP
    email? Or what IM client? MSN? AIM? Waiting for gmail messenger? Post away. ....
  23. Earn Money By Reading Emails
    10 cent per email (52)
    Hi, this site is called http://www.1-800-mail.com/ You earn money by reading emails, they sent
    you 15-20 emails per day, you click in the link and you have to visit the page for 60 seconds, then
    you ot 10 cents They gave you 20 U$$ singup credit! The only bad thin is for
    minimium you have to retired 125 U$$ Now i earn You have directly earned: $
    30.1400 You have earned from your Downline: $ 0.0000 Your account balance after all
    transactions: $ 30.1400 10 U$$ (20 no because is singup credit) I dont think is a ....
  24. My Guestbook And Spam
    do you have the same problem? (11)
    My guestbook keeps being spammed for some reasons. Sometimes I get similar messages from random
    people that I don't know. And they all write same message such as 'thank you very much for
    your site. It has given me information I need for my school project'. But my website is a
    personal site. It's about me and my BF and friends. Nothing at all about school projects etc
    etc. And this very same message will come back again from time to time but from different people.
    Another message is sth like 'I love you website. It rocks.' Initially, I thought ....
  25. Send Anonymous Email
    Great (18)
    Ever wanted to send someone an anonymous email withouth the slightest chance to tracing it to you?
    Try this then: http://formmail.cgiworld.net/email.cgi?rec...youwanttosendto Enter the email
    address in the link and the message you want to send and cgiworld.net will send it to you. Example
    http://formmail.cgiworld.net/email.cgi?rec...r=xxx@yahoo.com Great for pranks or for any other
    anonymous needs! ( I admit, spam is probably a definite issuses in services like this
    including the Send Your Email To Anything@mailinator.com topic below me. ) /bli....
  26. Problems With Outlook Express
    My email configuration isn't working (6)
    Does anyone have a clue as to why my outgoing email isn't working with Outlook express? I can
    get incoming mail, but I'm getting an error when I try to send email. I followed the
    configuration instructions, but it still isn't working correctly. I get an error everytime.....
  27. Auto Webpage Resolution Format
    Viewing Problem Help Needed Please (7)
    Hi, my website was created with Frontpage 2003. At screen resolution 1024 * 768. Now the problem
    that I am finding is people with a screen resol. 800 * 600 see the table and everything in the wrong
    place and its all messed up. Is there a way to make it so the site is compatiable with all screen
    resolutions. Thanx in advance for your help. Edited topic title. ....
  28. Bot's Cs Source ! Need Help !
    (5)
    I have counter strike source , when a create server i haven't , under choosing maps , add bot .
    if any one know how can i fix this problem or if i have to download somthing that add bot , just
    tell me any suggestion plz !....
  29. Paypal Scam Warning!
    New email attempt to hack your account (21)
    I've been getting those stupid scam emails for years, where they tell you to update your
    security info. I hope EVERYBODY knows those are a scam and NEVER click through. The proper response
    is to forward them to SPOOF@PAYPAL.COM, then delete the message without going to the site. Now
    there's a new one--at least this is the first time I've gotten one. This time they tell you
    that you've added a new email address and they want you to confirm. Again, the answer is to
    forward to SPOOF@PAYPAL.COM without clicking through or going to that site, then delete the ....
  30. Longest Email Address In The World
    (53)
    yourname@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com It is so long that...
    QUOTE -Some web forms are unable to read your email address -Some email software cannot be
    configured -People have a hard time typing in your email address -Companies think your email
    address is fake -The longest alphabetical email address on earth
    www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com....

    1. Looking for encode, email, address, confuse, spam, bots, viewing, clients

Searching Video's for encode, email, address, confuse, spam, bots, viewing, clients
Similar
My Hosting
Request
Email...
[resolved]
How To
Disable
Firefox'
s Awesome
Bar -
restore old
location/add
ress bar
from firefox
2
Halliluya
3; I'm
Either
Rich.... -
...or
it's an
email
scam!
Guess
which...
Spammers
Using My
Domain To
Send Spam
Form Not
Returning
Correct
Email
Address
Google Can
Send Spam -
Gmail can be
used as a
Spam Bazooka
Problem With
My Email :
[urgent] -
Can't
send or
receive
email.
Spam Is 30
Years Old
May 3, 2008
- Come
celebrate
the birthday
of the very
first SPAM
email
How To Find
New Ip
Address
Paypal Email
- where can
i find my
paypal
email? HELP
anyone
Way To Make
Money
Without Spam
Can You
Suggest A
Good Free
Email Server
To Download?
Auto-delete
Your Spam In
Gmail -
finally, get
rid of all
that
spam!
Unable To
Renew Ip
Address Or
Connect To
Internet
After
Broadband
Software
Uninstall -
issues after
removing DSL
software
Free Email
Service - I
am looking
to start a
free Email
service
Send Fake
Sms From
Your Nokia
Phone -
sending SMS
with your
own From
address
Email For My
Members
Does Gmail
Have Too
Much Spam
Emails? -
Vote!
How To Get
New Ip
Address -
Request a
new IP
address from
your ISP
server.
Time Viewing
Get 30 Gb
Email For
Free - let
us talk
about ,
email system
for huge
data !
What
Messenger/em
ail Service
Do You Use?
Earn Money
By Reading
Emails - 10
cent per
email
My Guestbook
And Spam -
do you have
the same
problem?
Send
Anonymous
Email -
Great
Problems
With Outlook
Express - My
email
configuratio
n isn't
working
Auto Webpage
Resolution
Format -
Viewing
Problem Help
Needed
Please
Bot's Cs
Source !
Need Help
!
Paypal Scam
Warning!
- New email
attempt to
hack your
account
Longest
Email
Address In
The World
advertisement



Encode Your Email Address - Confuse the Spam Bots, but not your viewing clients



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE