Hello
nistmaru, and welcome to the forum.
It's been a long time since I used a FrontPage email form, so I haven't looked closely at your code yet to find the specific reason it isn't working, but I wanted to get this reply to you quickly because I think even if you get it working, it isn't going to achieve the result you want.
Email addresses are harvested by robots from the source code of the page that is
sent out from the server when that page is requested, not from the source code of your page as it sits on the server. So pulling out the email address into an include file won't make any difference. Here's what I mean:
If you
don't use the PHP include, your code on the page that is sent out from the server looks like this:
Example #1:
<form method="POST" action="--WEBBOT-SELF--" onSubmit="">
<!--webbot bot="SaveResults" u-file="_private/form_results.csv"
s-format="TEXT/CSV" s-label-fields="TRUE"
b-reverse-chronology="FALSE" s-email-format="TEXT/PRE"
s-email-address="webmaster@mydomain.com"
b-email-label-fields="TRUE" b-email-subject-from-field="FALSE"
s-email-subject="form test" s-builtin-fields
startspan -->
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<!--webbot bot="SaveResults" endspan
i-checksum="43374" --><p>
<input type="text" name="name" size="20"><br>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
If you
do use the PHP include, your source code is what you provided:
Example #2:
<form method="POST" action="--WEBBOT-SELF--" onSubmit="">
<?php include($_SERVER['DOCUMENT_ROOT'] . '/inc/fpwebbot.php'); ?>
<input type="text" name="name" size="20"><br>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
but when PHP processes the include, it grabs the text from the include file, and inserts it at the specified location, so the end result looks like this:
Example #3:
<form method="POST" action="--WEBBOT-SELF--" onSubmit="">
<!--webbot bot="SaveResults" u-file="_private/form_results.csv"
s-format="TEXT/CSV" s-label-fields="TRUE"
b-reverse-chronology="FALSE" s-email-format="TEXT/PRE"
s-email-address="webmaster@mydomain.com"
b-email-label-fields="TRUE" b-email-subject-from-field="FALSE"
s-email-subject="form test" s-builtin-fields
startspan -->
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<!--webbot bot="SaveResults" endspan
i-checksum="43374" --><p>
<input type="text" name="name" size="20"><br>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
which is exactly the same as Example #1. In other words, pulling the email address out into an include file doesn't change the code that your server actually sends to whoever requested the page because the code is put right back where it was in the first place.
------------
When somebody fills out your form and submits it, their browser sends all the data back to a "forms handler" program on your server. In the case of FrontPage, that forms handler program is a part of the "FrontPage Extensions". Because the email address to which it should send the resulting email is not hard-coded into the forms handler program itself, it has to be part of the data sent back from the client's browser, which means that the email address has to be in the source code of the page. Unfortunately, I'm not aware of any tricks that allow hiding or obscuring the email address when using the FrontPage forms handler. I could be wrong, but that would seem to mean FrontPage email forms are always vulnerable to harvesting.
One solution would be to use a different forms handler, one in which the email address is hard-coded into the script itself. That way, when incoming forms data arrives, the script doesn't have to be told where the email should go, because it already knows.
One forms handler that does this, and the one I've seen most often recommended by people knowledgable about the security issues of forms handlers is called
NMS FormMail. It is available at
http://nms-cgi.sourceforge.net/scripts.shtml. There is a walk-through of how to modify FrontPage forms to use it at
http://25yearsofprogramming.com/blog/2008/20080518.htm. NMS has the additional advantage of getting you one step away from dependence on the FP extensions.
I'll be happy to try to help if you encounter problems.
When I stopped using the FrontPage forms handler, I wound up abandoning forms altogether, and switched to a ridiculously simple alternative: I just put my email address on the web page like: address AT mydomain DOT com. That wouldn't be suitable for everyone, though. Sometimes a form is needed.