You are here: Re: php/javascript - hiding email addresses « All PHP « IT news, forums, messages
Re: php/javascript - hiding email addresses

Posted by Adamski on 05/22/05 04:06

On Fri, 20 May 2005 22:39:35 -0400, Michael Trausch wrote:

>noSpAm0000 wrote:
>> I'm trying to take email addresses from a MySQL database and then place
>> them on a page, hiding the email addresses from spam harvesting software
>> using JavaScript.
>>
>> I'm a beginner at PHP -- is there a way I can take the email addresses out
>> of the database and split each of them into 3 variables that I can
>> reassemble on the page with JavaScript? I have about 10 email addresses
>> per page.
>>
>> Thanks.
>>
>>
>
>Using string manipulation functions, you can break it apart into two or
>three variables, and then output it however you like. Check out the PHP
>manual online and read up on the PHP functions to put it together. Your
>best bet would be to put this in a function that you'd pass the e-mail
>address in as a parameter, and return an array.
>
> - Mike


If your pages are being created *dynamically*, then they don't exist
until a query on the database is made. Can search engines do that?
(genuine question).

For a *static* page, I've used something like this:

<script>
document.write("<a href='mailto:");
document.write("fredbloggs");
document.write("\100");
document.write("somwhere.com");
document.write("'>");
document.write("Web Admin");
document.write("</a>");
</script>

Of course, "fredbloggs" and "somwhere.com" could be filled from your
database. What happens to users that have disabled Javascript, though?


Adam.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация