Envairoment variables

php.internals

epplestun

22 years ago
Hi I am looking for the code that generates the value of REMOTE_ADDR so that I want to make a code that gives the MAC address of the visitor and I am looking into http://lxr.php.net but I don´t found nothing, if some can help me ... :-) Regards Iván Rodriguez Espada _________________________ ALAPLAYA.COM http://www.alaplaya.com epplestun@alaplaya.com

Filip de Waard

22 years ago
On Thu, 2003-10-30 at 15:18, Ivan Rodriguez wrote:
> I want to make a code that gives the MAC address of the visitor
The MAC address is only available on the same network, but you could always read the headers (php.net/getallheaders). This is the wrong list, BTW. Regards, Filip de Waard

epplestun

22 years ago
What I want to know is the code that gives the REMOTE_ADDR nothing else, in which file this that code?¿ ----- Original Message ----- From: "Filip de Waard" <dewaard@netcollective.nl> To: "Ivan Rodriguez" <epplestun@alaplaya.com> Cc: "php-dev" <internals@lists.php.net> Sent: Thursday, October 30, 2003 3:50 PM Subject: Re: [PHP-DEV] Envairoment variables

Derick Rethans

22 years ago
On Thu, 30 Oct 2003, Ivan Rodriguez wrote:
> What I want to know is the code that gives the REMOTE_ADDR nothing else, in > which file this that code?¿
Not in the PHP Source, you'll have to find the source of IE or Mozilla in order to do something. This is something totally related to the client side, and not to the serverside (apache, php, mysql). Derick
-- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ -------------------------------------------------------------------------

epplestun

22 years ago
Ok, But if the REMOTE_ADDR is part of the client and it gives back a PHP variable to it, it is not possible to do the same with the MAC address ----- Original Message ----- From: "Derick Rethans" <derick@php.net> To: "Ivan Rodriguez" <epplestun@alaplaya.com> Cc: "Filip de Waard" <dewaard@netcollective.nl>; "php-dev" <internals@lists.php.net> Sent: Thursday, October 30, 2003 4:18 PM Subject: Re: [PHP-DEV] Envairoment variables
> On Thu, 30 Oct 2003, Ivan Rodriguez wrote: > > > What I want to know is the code that gives the REMOTE_ADDR nothing else,
in

Derick Rethans

22 years ago
On Thu, 30 Oct 2003, Ivan Rodriguez wrote:
> Ok, But if the REMOTE_ADDR is part of the client and it gives back a PHP > variable to it, it is not possible to do the same with the MAC address
Of course not, who is supposed to show PHP (on the server) the MAC address? right, the CLIENT, or also called the Browser. Now, as this is impossible UNLESS you hackup the browser... wrong list. (And killfile) Derick
-- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ -------------------------------------------------------------------------

epplestun

22 years ago
oks thx ----- Original Message ----- From: "Derick Rethans" <derick@php.net> To: "Ivan Rodriguez" <epplestun@alaplaya.com> Cc: "php-dev" <internals@lists.php.net> Sent: Thursday, October 30, 2003 4:44 PM Subject: Re: [PHP-DEV] Envairoment variables

George Schlossnagle

22 years ago
On Thursday, October 30, 2003, at 10:41 AM, Ivan Rodriguez wrote:
> Ok, But if the REMOTE_ADDR is part of the client and it gives back a > PHP > variable to it, it is not possible to do the same with the MAC address.
IP addresses are machine identifiers in IP, so when someone makes an http connection to you, you two establish a TCP/IP session and thus you need to know the remote server IP address to make it work at all. MAC addresses are part of the lower level ethernet protocol, and serve as a way of direct neighbors (folks on the same ethernet segment) to know who each other are. Thus, when you have a connection that crosses any sort of network routing device (anything that does more than simply forward packets), the MAC address does not get propogated. This is simply 'The Way Things Work' (tm), and their is no changing it. Of course a machine knows it's own MAC and a browser can set any header field it want, but deciding what to send is up to the browser, not up to PHP. I don't know of any browser that sends it's MAC address, but regardless that is something that's up to the browser vendors, not PHP. We understand what you are trying to do and you can't do it. George

epplestun

22 years ago
George your answer is most valuable, thanks. ----- Original Message ----- From: "George Schlossnagle" <george@omniti.com> To: "Ivan Rodriguez" <epplestun@alaplaya.com> Cc: "Derick Rethans" <derick@php.net>; "Filip de Waard" <dewaard@netcollective.nl>; "php-dev" <internals@lists.php.net> Sent: Thursday, October 30, 2003 4:52 PM Subject: Re: [PHP-DEV] Envairoment variables

Jan Kneschke

22 years ago
On Thu, Oct 30, 2003 at 03:18:26PM +0100, Ivan Rodriguez wrote:
> Hi > > I am looking for the code that generates the value of REMOTE_ADDR so that > I want to make a code that gives the MAC address of the visitor and I am > looking into http://lxr.php.net but I don´t found nothing, if some can > help me ... :-)
Just to clearify where REMOTE_ADDR is ocmming from: REMOTE_ADDR is part of the CGI-Spec and is provided by the Webserver which handles the connection to the client. something like: cfd = accept(fd, &(sockaddr), sockaddrlen); cgi_var("REMOTE_ADDR", inet_ntoa(sockaddr.in...)); But as it has been said by georg: there is no way to get MAC address of the client, if the client isn't in the same physical network (where you could to a ARP request)
> Iván Rodriguez Espada
Jan
-- http://jan.kneschke.de - localizer, modlogan, pxtools, lighttpd mailto:jan@kneschke.de - Jan Kneschke