Track people using a web form

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
User avatar
m4a2t0t
Posts: 3962
Joined: Tue Apr 03, 2001 12:00 am
Location: Phoenix AZ

Track people using a web form

Post by m4a2t0t »

http://talkaboutwireless.biz/contact_us.php

Is there anyway to track a person that uses this page? I have someone sending us some messages and I would like to find out who they are.
Will Work For FSB
User avatar
TonyT
SG VIP
Posts: 10356
Joined: Fri Jan 28, 2000 12:00 am
Location: Fairfax, VA

Post by TonyT »

yes, you can grab any user's ip address who uses the form.
oe you could use a cookie to track 'em, but that's less reliable as the user could have cookies disabled but cannot disable their ip address unless going through a proxy server beforehand.

code to grab user's ip address in the form:

Code: Select all

<!-- goes in the html form itself -->
<input type="hidden" name="ip" value="<?php echo $IP ?>">
code to post user's ip address in the php mail script:
(depending on your script)

Code: Select all

// get posted data into local variable
$ip = Trim($_POST[ip]);
No one has any right to force data on you
and command you to believe it or else.
If it is not true for you, it isn't true.

LRH
User avatar
m4a2t0t
Posts: 3962
Joined: Tue Apr 03, 2001 12:00 am
Location: Phoenix AZ

Post by m4a2t0t »

Thanks TonyT I will give that a go and see how it works.
Will Work For FSB
Post Reply