StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > Webmaster > Lounge (non-StatCounter related topics here!)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2007, 04:23 AM
donecweb donecweb is offline
Senior Member
 
Join Date: Mar 2005
Location: Texas
Posts: 1,035
Default Hiding e-mail address with php

I thought spiders can't read things on the page that are there due to being there via PHP includes. If this is true then why not use a PHP include to hide your e-mail address.
__________________
DonEc

Links and accurate information provide the best answer, while garbage in provides garbage out.
Reply With Quote
  #2  
Old 07-07-2007, 05:05 AM
Sharron's Avatar
Sharron Sharron is offline
Moderator
 
Join Date: Feb 2005
Posts: 7,058
Default

Quote:
Originally Posted by donecweb View Post
I thought spiders can't read things on the page that are there due to being there via PHP includes. If this is true then why not use a PHP include to hide your e-mail address.

huh? I'm not aware of that. Once a web page in live, the text that is delivered to a web page via the php code then becomes text in a html format

Just go to any site like JWJ's and view the source code. You won't see any php code, but you will see the results of the code.
__________________






Don't argue with an idiot; people watching may not be able to tell the difference.
Reply With Quote
  #3  
Old 07-07-2007, 05:07 AM
Car Guy's Avatar
Car Guy Car Guy is offline
Moderator
 
Join Date: Jan 2007
Location: Vancouver, Canada
Posts: 3,628
Default

I found a simple javascript to stop email harvesting.

<SCRIPT TYPE="text/javascript">
<!--
emailE=('xxx@' + 'xxx.com')
document.write('<A href="mailto:' + emailE + '">' + emailE + '</a>')
//-->
</script>

Just replace the "X"s with your email address, and paste into your page code.

Richard
__________________
Forum Rules - Statcounter FAQ - Getting Started - Knowledge Base
As you get older three things happen. The first is your memory goes, and I can't remember the other two...
Richard
Reply With Quote
  #4  
Old 07-07-2007, 07:04 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,147
Default

Quote:
Originally Posted by donecweb View Post
I thought spiders can't read things on the page that are there due to being there via PHP includes. If this is true then why not use a PHP include to hide your e-mail address.
php code is not displayed so not read.

But for anything to be a page, it has to be produce html - that's what's read.

If you want to use mailto: that needs to be output as html code.
So that will get seen.

You can have mailto: and no email address, let use fill it out manually. But if you do put out an email address then it's very visible. Unless obfuscated by JavaScript or turned to unicode.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.

Last edited by webado; 07-07-2007 at 02:01 PM. Reason: must have typed with closed eyes..
Reply With Quote
  #5  
Old 07-07-2007, 11:55 AM
-=Seth=- -=Seth=- is offline
Active Member
 
Join Date: Nov 2006
Location: lost in space
Posts: 516
Default

do you have to have the +

<SCRIPT TYPE="text/javascript">
<!--
emailE=('myemail@' + 'domain.com')
document.write('<A href="mailto:' + emailE + '">' + emailE + '</a>')
//-->
</script>


i tried using css to write the address backward so the harvesters would get the wrong email address, unfortunately when genuine users try to copy and paste it, it comes out backward, not ideal may as well just have a .gif, but i might try your javascript idea
Reply With Quote
  #6  
Old 07-07-2007, 02:03 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,147
Default

Better try this:

http://oyoy.eu/page/jscode/

(scroll down)
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
Reply With Quote
  #7  
Old 07-07-2007, 05:50 PM
-=Seth=- -=Seth=- is offline
Active Member
 
Join Date: Nov 2006
Location: lost in space
Posts: 516
Default

thats a cool little tool

is it possible to Encrypt the email address you use in forms as well
Reply With Quote
  #8  
Old 07-07-2007, 06:25 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,147
Default

Depends how you use the form.

If the form is submitted using mailto: and the email address and the contents of the form, then sure, it's the same as just mailto: alone with the email address that opens the email client.

If the form has an external action script that performs the collection of form data and prepares an email and sends it using server-side mail funcitns, then you don't need to encrypt the email address (cannot do it even). However you should never ever keep the email address of the recipient in the form fields to pass to the action script, let it be coded into the action script itself whihc canot be seen by robots or any users.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
Reply With Quote
  #9  
Old 07-07-2007, 06:26 PM
donecweb donecweb is offline
Senior Member
 
Join Date: Mar 2005
Location: Texas
Posts: 1,035
Default

I may be way off here, but I thought bots read the HTML on the server and did not parse the page like a browser does. This would mean they would see the PHP include but would not see the text stored on the server to be placed within the page.
__________________
DonEc

Links and accurate information provide the best answer, while garbage in provides garbage out.
Reply With Quote
  #10  
Old 07-07-2007, 10:06 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,147
Default

Who "they"?

php code is executed on the server and only if it outputs html code (including plain text and javascript) is anything shown in the browser.

Bots read the html code that is OUTPUT by the server the same way it is output to a browser.

Bots like browsers cannot see any php code whatsoever - if they do, the server is badly misconfigured and doesn't work - meaning php is not installed and functional at all.

Look at any of my websites, what evidence of php do you see? none.

Yet every one of my pages is created using several php scripts.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.

Last edited by webado; 07-07-2007 at 10:10 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.