By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

Tracking IP address of visitors to my website

P: n/a
Hi,
I posted a question to this forum a few days ago and got a veyr good
response - unfortunately I asked the wrong question (I asked about
referring domains, not IPs of visitors).

I've got a tracker on my webpages, from a third party, and it does
this very trick - I can follow bits of the script, like calculating
screen properties, but I just can't work out how the IP is stored or
calculated!

The script is:

<script><!--
an=navigator.appName;sr='http://x3.extreme-dm.com/';srw="na";srb="na";d=document;r=41;function
pr(n) {
d.write("<img src=\""+sr+"n\/?tag=drplee&p=http%3A%2F%2Fwww.btinternet.com%2F%7 Edr_paul_lee%2Forbs.htm&j=y&srw="+srw+"&srb="+srb+ "&l="+escape(d.referrer)+"&rs="+r+"\"
height=1 width=1>");}//-->
</script><script language="javascript1.2"><!--
s=screen;srw=s.width;an!="Netscape"?srb=s.colorDep th:srb=s.pixelDepth//-->
</script><script><!--
pr()//-->
</script><noscript><img
src=http://x3.extreme-dm.com/z/?tag=drplee&p=http%3A%2F%2Fwww.btinternet.com%2F%7 Edr_paul_lee%2Forbs.htm&j=n
height=1 width=1></noscript>

Can anyone help?

Thanks

Paul
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Paul Lee wrote:
I posted a question to this forum a few days ago and got a veyr good
response - unfortunately I asked the wrong question (I asked about
referring domains, not IPs of visitors).
There is no way to find out what the IP Address if the visitor is using
JavaScript. (You can use another technology and read from that using
JavaScript though - but its not very reliable, which of the 5 ip addresses
the machine I'm sitting at has would you like?)
I've got a tracker on my webpages, from a third party, and it does
this very trick - I can follow bits of the script, like calculating
screen properties, but I just can't work out how the IP is stored or
calculated!


<snip really ugly scripting>

It writes an <img> tag to the page. The visitor then requests the image and
the server the image is requested from logs it. The JavaScript is
irrelevent.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2

P: n/a
David Dorward wrote:
There is no way to find out what the IP Address if the visitor is using
JavaScript. (You can use another technology and read from that using
JavaScript though - but its not very reliable, which of the 5 ip addresses
the machine I'm sitting at has would you like?)


Not to mention that one most certainly gets the IP address of the
proxy server the individual is using which most certainly more than
one individual is using and even if it is not the proxy server, IP
addresses tend to be dynamically assigned, i.e. changing for the
same host. IP addresses are simply the wrong way to track users.
PointedEars
Jul 20 '05 #3

P: n/a
*sigh*

Oh well, thanks for your help, even though it was not the answer that
I wanted.

I just thought that it would be nice to refer particular people to
certain webpages, e.g. in pseudo code:

if (ip-address==whatever)
{
change URL to update.htm
}
else
{
change URL to news.htm
}

Darn. Oh well, thanks again, my friends!

Best wishes

Paul
----------------------
http://www.paullee.com
Jul 20 '05 #4

P: n/a
Paul Lee wrote:
*sigh*
Hey, that's *my* line!!1
Oh well, thanks for your help, even though it was not the answer that
I wanted.
Well, here is a discussion newsgroup and not a (paid) support forum.
All you get is advice.
I just thought that it would be nice to refer particular people to
certain webpages, e.g. in pseudo code:
What part of `You cannot do this with client-side JavaScript!' did you
not understand? And I have not enough experience in server-side
JavaScript (I rather use PHP for server-side scripting since it is for
free and open source), you need to read on it for yourselves. Google
is your friend. [psf 6.1]

But the proxy issue is still valid, even with CGI you get a problem.
The only reliable way to workaround it, is a login form which can be
automated client-side (using the UAs password manager to fill user
name and password, e.g.) and quite easily implemented server-side.
The easiest way to do this is HTTP Authentication using .htaccess and
..htusers (and .htgroups) files, e.g. The most sophisticated but not
that easy way is account management using a server-side application
(written in a scripting language.)
----------------------
http://www.paullee.com


Signatures are to be separated by a line of dashDashSpace (`-- '),
otherwise they may be "advertising the same service", IOW spam and
thus may be (automatically) canceled. Yours, for example.
PointedEars
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.