web_master Posted November 4, 2009 Share Posted November 4, 2009 Hi, is some possibilty to cache someones mac-address, like as can cache the IP address getenv( 'REMOTE_ADDR' ) ? When someone log in, than to log from a different ip address, but only with his mac-address... thnax Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/ Share on other sites More sharing options...
Bricktop Posted November 4, 2009 Share Posted November 4, 2009 Hi web_master, Unfortunately, you cannot get a client machine's MAC address using PHP. Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/#findComment-951033 Share on other sites More sharing options...
web_master Posted November 4, 2009 Author Share Posted November 4, 2009 Hi web_master, Unfortunately, you cannot get a client machine's MAC address using PHP. Thanks Bricktop Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/#findComment-951035 Share on other sites More sharing options...
nadeemshafi9 Posted November 4, 2009 Share Posted November 4, 2009 Hi web_master, Unfortunately, you cannot get a client machine's MAC address using PHP. if javascript can some how capture it or is passed it, you may be able to ajax it over Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/#findComment-951046 Share on other sites More sharing options...
nadeemshafi9 Posted November 4, 2009 Share Posted November 4, 2009 var strComputer = "."; var objWMIService = GetObject("winmgmts:\\\\" + strComputer + "\\root\\cimv2"); var e = new Enumerator(objWMIService.ExecQuery("Select * from Win32_NetworkAdapter","WQL",48)); for (;!e.atEnd();e.moveNext()) { objItem = e.item(); WScript.Echo ("MACAddress: " + objItem.MACAddress) } Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/#findComment-951047 Share on other sites More sharing options...
nadeemshafi9 Posted November 4, 2009 Share Posted November 4, 2009 Advanced JavaScript with Internet Explorer: Retrieving Networking Configuration Information - How to retrieve MAC address and other extended network information using JavaScript (Page 2 of 6 ) Now, let us try to extend the previous sample by showing further information about the network adapters. The entire code for the sample is as follows: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title></title> <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"> <meta name="vs_targetSchema" content="http://schemas. microsoft.com/intellisense/ie5"> <script id="clientEventHandlersJS" language="javascript"> <!-- function Button1_onclick() { var locator = new ActiveXObject "WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration"); var e = new Enumerator (properties); document.write("<table border=1>"); dispHeading(); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("<tr>"); document.write("<td>" + p.Caption + "</td>"); document.write("<td>" + p.IPFilterSecurityEnabled + "</td>"); document.write("<td>" + p.IPPortSecurityEnabled + "</td>"); document.write("<td>" + p.IPXAddress + "</td>"); document.write("<td>" + p.IPXEnabled + "</td>"); document.write("<td>" + p.IPXNetworkNumber + "</td>"); document.write("<td>" + p.MACAddress + "</td>"); document.write("<td>" + p.WINSPrimaryServer + "</td>"); document.write("<td>" + p.WINSSecondaryServer + "</td>"); document.write("</tr>"); } document.write("</table>"); } function dispHeading() { document.write("<thead>"); document.write("<td>Caption</td>"); document.write("<td>IPFilterSecurityEnabled</td>"); document.write("<td>IPPortSecurityEnabled</td>"); document.write("<td>IPXAddress</td>"); document.write("<td>IPXEnabled</td>"); document.write("<td>IPXNetworkNumber</td>"); document.write("<td>MACAddress</td>"); document.write("<td>WINSPrimaryServer</td>"); document.write("<td>WINSSecondaryServer</td>"); document.write("</thead>"); } //--> </script> </head> <body> <INPUT id="Button1" type="button" value="Button" name="Button1" language="javascript" onclick="return Button1_onclick()"> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/#findComment-951051 Share on other sites More sharing options...
nadeemshafi9 Posted November 4, 2009 Share Posted November 4, 2009 http://docs.jquery.com/Ajax/jQuery.ajax#options $.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } }); Quote Link to comment https://forums.phpfreaks.com/topic/180284-cache-mac-address/#findComment-951052 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.