hi i need some help on how can i retrieved users mac address
using php?

so that i can restrict an access to my admin page ..
thanks

Recommended Answers

All 2 Replies

You cannot get an external MAC address of a user without having local LAN access to them... UNLESS: you have access to a good ARP table and only if the client is connected DIRECTLY to the php server (if there are routers/gateways that NAT the traffic, the returned MAC address will be that of the gateway)

Here is a script to retrieve local MAC addresses via PHP (on Windows):

LOCAL MAC via PHP

There are easier methods to restrict access via PHP....
i.e. user/password, ip filtering, etc....

HTH's

You cannot get an external MAC address of a user without having local LAN access to them... UNLESS: you have access to a good ARP table and only if the client is connected DIRECTLY to the php server (if there are routers/gateways that NAT the traffic, the returned MAC address will be that of the gateway)

Here is a script to retrieve local MAC addresses via PHP (on Windows):

LOCAL MAC via PHP

There are easier methods to restrict access via PHP....
i.e. user/password, ip filtering, etc....

HTH's

I agree, MAC Address filtering seems very difficult, but a word of warning with IP Filtering. If a network connects to the internet through a router or server, several computer could have the same IP address. When banning IP's be careful that your not banning an entire network (such as a school or business).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.