Click to See Complete Forum and Search --> : system command not working in webserver


raj_2006
09-29-2006, 01:00 AM
Hi all

I am using a system command that will work through shell_exec() to track the physical address of a lan card.

It is working nicely from my localhost but when i am trying to run the code from the webhosting company's server then nothing is happening.

here is the code:

$output1 = shell_exec('ipconfig /all');
preg_match('/Physical.*/i', $output1, $result);
preg_match('/:.*/i', $result[0], $res);
list($a,$b)=explode(":",$res[0]);
$b=trim(" $b ");//here $b is the physical address which i am getting.

Please suggest me shall i inform the hosting company or change the something in my code.

Thanks in advance

Luv
Raj

bokeh
09-29-2006, 02:42 AM
It's not possible to grab a MAC address over the internet.

raj_2006
09-29-2006, 03:20 AM
thanks......i understand.....can i use any client side coding like javascript or something else through I can grab the mac id....so that i dont need to send the request in the webserver

or is there any possible means to get the mac id.

plz suggest

bokeh
09-29-2006, 04:42 AM
thanks......i understand.....can i use any client side coding like javascript or something else through I can grab the mac id....so that i dont need to send the request in the webserver

or is there any possible means to get the mac id.

plz suggestThe Javascript sandbox does not allow the harvesting of private data from your client's machine, whether it be related to other domains or the client machine itself.

Java does allow it though but will first raise a warning asking the user if it is ok for potencially malicious code to be run on their machine.

raj_2006
09-29-2006, 11:32 AM
hmm...so is there no way to track the macid from the webhosting server?

bokeh
09-29-2006, 11:35 AM
No, and there should be either.