I am using a php script which takes a timestamp value from browser and tries to set the system clock. i m using mamp box in my mac mini. how do i set the mac mini system clock through php script.
I tried using shell_exec, exec, system for achieving this , but it doesn't work.
Example, my php script looks something like this,
<?
$timestamp = $_GET['timestamp'];
exec('date '.$timestamp);
?>
When i try the same date set command in terminal i see the clock changing. ( sudo date timestamp ), but i dont know how to achieve it through php script executing a privileged command. Kindly help.
Thanks, Srini.