I am trying to send php variables to a function, but none of the following are passing the variables.
$vars='email=' . $_POST['email'] . '&password=' . $_POST['password'] . '&server=' . $_POST['server'];
$function = 'nohup php unsubscribefunction.php ' . escapeshellarg($vars);
exec($function);
exec('nohup php unsubscribefunction.php ' . $vars);
exec('nohup php unsubscribefunction.php $vars ');
$vars='?email=' . $_POST['email'] . '&password=' . $_POST['password'] . '&server=' . $_POST['server'];
$function = 'nohup php unsubscribefunction.php' . $vars;
exec($function);
Here's what the php.net page says about this
When allowing user-supplied data to be passed to this function, use escapeshellarg() or escapeshellcmd() to ensure that users cannot trick the system into executing arbitrary commands.
However, there are no examples on how to pass the variables, any insights or examples would be appreciated.