Reply to Re: How to get the username, without login prompt?

Your name:

Reply:


Posted by Gordon Burditt on 05/23/05 01:50

>I have a similiar problem: I need to know the local IP / MAC adress of
>the client from which the user logs on,

You can't know the MAC address unless the client is on the same
wire as the server. Otherwise what you get is the MAC address of
your router.

You can know the public IP address of the client as $_SERVER['REMOTE_ADDR']
but this may be the public IP address of a proxy, NAT gateway, etc.
and it's not guaranteed that this address will stay the same between
one web request and the next (e.g. load-balanced proxies).

Also, do you realize how many machines out there have the local IP
address of 192.168.1.1 ?

>as the configuration of some
>applications is dependent on the HW configuration (peripherals). the

What possible connection does either the MAC address or IP address
have to hardware configuration? Are you trying to collect an
inventory list of the location of hardware so you can steal it to
order or sell it to someone who does?

>usual remote_addr thing does not work, as client in intranet or
>internet (remote from home), webserver from where the application
>runs is internet (1 client W98, all other XP, all IE).

>In a lot of js forums / docs I found statements that I can get ip /
>mac with js / activex, but no reasonable info on how to. (what
>happens on a notebook with LAN/WLAN nic?)

PHP runs on the SERVER, not the client. And it's exactly this sort
of crap with Javascript that makes people want to turn it off.

Gordon L. Burditt

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация