phpformsbotsspamemail-address

Can spam robots scan PHP pages for email addresses?


I have a PHP contact form with captcha, for the purpose of trying to limit the spam I get. Within the PHP code I have the actual email address that the form information gets sent to written in the code.

My questions is can spam robots that trawl the web for email address pick up an email address that is written in PHP?

It isn't displayed on the web page in HTML. When I look at the source of the page I can't see the email address. Even saving the page to my hard drive doesn't reveal the PHP code.

Thanks for your help


Solution

  • No. The PHP code can never be read by any client. It lives and executes on the server side.

    All php blocks get executed on the server side and only the results are sent to the client. Be careful about debug messages, you should generally turn off debug messages on a live site. The result produced by the server is all anyone can see, unless of course someone has compromised your server.