문제

New so maybe a problem with correct use however;

Developing a php /web based ordering system needing to identify device (browser) when placing order. Currently using getenv:

 $terminal = getenv('REMOTE_ADDR');

Majority of results as expected - Device IP. Occasionally with unexpected results of MAC address not IP.

$_SERVER['REMOTE_ADDR']; 

and/or combinations of

getenv('HTTP_X_FORWARDED_FOR')

don't seem to provide a different result.

IP address is set manually so is there a better / correct (?) way to uniquely identify the device / user?

Probably something obvious but any guidance would be appreciated.

도움이 되었습니까?

해결책

It's not a MAC address it is an IPV6 Address which looks a whole lot like a MAC address.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top