Begginers php help.....

  maanse 22:48 05 Nov 08

Hello there,

ive aded an email link on my website that basically opens a php page that contains this code:

_ ?php
header ("Location:");

but it redirects to a blank page after opening OE... any ideas how to make the original page stay displayed.

  Ryanmt 10:35 07 Nov 08

you could cheat and load a very small iframe with the php script in, that in theory would not reload your page.. but i have to wonder why really. whats wrong with just linking to the email address the
<a href="mailto:xyx">here</a> method

  maanse 17:42 07 Nov 08

Hi Ryanmt,

Thanks for the response, the only reason i dont want to use the standard html mailto link is because of the whole spam bot/crawlers that go about harvesting emails for spam purposes.

The only other option i can think of with my limited knowledge of webdesign is to put an image in place that contains the email address. That way the actual address isnt shown in the code and shouldnt be harvested by a bot.

  cortez© 15:17 19 Nov 08

Hi, that wont work as header function sends the request as a http request to the browser. So when you set the header location to an email address thats exactly like entering into the adress bar in IE - outlokk will open but the page will obviously be blank.

There are many ways to hide your email adress, just have a quick google. A quick way to is output the email in unicode E.g. <a href="mailto:%66%6f%6f%40%62%61%72%2e%63%6f%6d">foo's email</a>
Another quick method is to try a fake email like:

However, the best I have come across is to use javascript session/ajax and php to obfuscate your email. E.g. the email is outputted to the page in md5. IF you google this on google there are many guides.

  cortez© 15:23 19 Nov 08

EDIT: actually try changing your code to what i have below, as that may work (not tested mind):

header ("Location:");

  cortez© 15:23 19 Nov 08

EDIT: actually try changing your code to what i have below, as that may work (not tested mind):

< ?php
header ("Location:");
? >

  maanse 18:34 19 Nov 08

Hi cortez

Thanks for your response, i had almost given up on this one. There are some good suggestions there and i will certainly be using one of them.

although i dont like this method

It looks a bit silly.

I will try the php code above first tho and let you know if it works....



  cortez© 20:02 19 Nov 08

yer, the fake email method is a quick dirty method. If you're really paranoid try the md5 method and if you are insanely paranoid salt the md5 (google that one) :)

  maanse 20:55 19 Nov 08

Im not really paranoid so i probably wont bother going down the route of md5, im just trying to think ahead, if the email inbox gets flooded with spam the site owner will be on my back.....

trust me its not fun.

So if i can slow down the little buggers hopefully i will save myself hassle.

Thanks again for the help. ;)

This thread is now locked and can not be replied to.

Sniper Elite 4 review: Headshotting Nazis has never felt so good

1995-2015: How technology has changed the world in 20 years

The Fresh New Fonts of 2017

WWDC 2017 dates: How to get WWDC 2017 tickets, when is WWDC 2017 and more details announced