bukwus Posted April 19, 2006 Share Posted April 19, 2006 I asked in the HTML forum if there was a way to hide email addresses from spam bots. I got a good answer that uses JavaScript.I was wondering if the same kind of solution would work using PHP, seeing as JavaScript is browser side and PHP is server side.Here's the example:<?php $emailInfo ="info@" . "host." . "com"; print "<p><a href=\"mailto:" . $emailInfo . "\">General Inquiries</a></p>"; ?>Many thanks Link to comment Share on other sites More sharing options...
real_illusions Posted April 19, 2006 Share Posted April 19, 2006 you could just use an online form for people to fill out and then when they send it, it sends you an email.theres loads of examples and scripts out there, do a google search for "php mailing" and you should find some. Link to comment Share on other sites More sharing options...
bukwus Posted April 19, 2006 Author Share Posted April 19, 2006 Tables are definately what we're headed for, but I just need a quick fix for the time being. Do you think my example would keep bots from reading the addresses? Link to comment Share on other sites More sharing options...
aspnetguy Posted April 19, 2006 Share Posted April 19, 2006 Tables are definately what we're headed for, but I just need a quick fix for the time being. Do you think my example would keep bots from reading the addresses?<{POST_SNAPBACK}> No it wouldn't. The php is rendered then sent to the browser. THe bot only sees the browser so by the time the bot sees it it is already built and viewable.The reason the JavaScript example worked is because it builds the email address after the page is rendered, after the bot has already read the page. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 19, 2006 Share Posted April 19, 2006 You can also use PHP to create an image that shows the email address, but it wouldn't be able to be clicked on to email unless you still have javascript that obfuscates the address. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now