Re: Retriving IP from web visitors question
by "Keith D Sellars" <Keith(at)webgraffix.com>
|
| Date: |
Thu, 12 Dec 2002 23:12:39 -0500 |
| To: |
"HWG Basics" <hwg-basics(at)hwg.org> |
| References: |
p1 |
| |
todo: View
Thread,
Original
|
|
You can echo the IP address to the screen with php with the following
command:
<? echo "$REMOTE_ADDR" ?>
As a form input:
<input type="hidden" value="<? $REMOTE_ADDR " ?>">
On the form is submitted to, you can echo the value of the above variable
(which is the IP address). I haven't tried the code above exactly this way,
but it is very similar to something that I've done in the past that worked
well.
We did it at http://www.schoolpad.net/page.php?TeacherID=293&Page=3 and it
works very well. It almost stopped our vulgar email problems completely.
Thanks,
Keith D Sellars
WebGraffix
www.webgraffix.com
"Making database sites seem easy"
----- Original Message -----
From: "Beauford.2002" <beauford.2002(at)rogers.com>
To: "HWG Basics" <hwg-basics(at)hwg.org>
Sent: Friday, December 13, 2002 10:10 PM
Subject: Retriving IP from web visitors question
> Hi,
>
> A friend of mine has a website with a form on it that users fill in and
the
> results get sent to x(at)x.com. That address then sends an auto response to
the
> email address that was put in the form.
>
> With that out of the way, he wants to be able to capture the IP address of
> the person filling out the form and store it in the original form, so when
> the auto response gets sent back it will show the IP address of who filled
> out the form.
>
> How would you go about capturing the IP address.
>
> All this is due to spam problems from a few idiots.
>
> TIA
>
> Beauford
>
>
>
>
>
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.