Looking for a Freelancer to modify my script to create accounts in a mysql database. The script is below minus ip and password....
<?
session_start();
include('Net/[login to view URL]');
$email = $_SESSION['email'];
$password = $_SESSION['password'];
$user = $email;
$pass = $password;
$ssh = new Net_SSH2('X', 22);
if (!$ssh->login('root', 'X')) {
exit('Login Failed');
}
// Create Central User Account
$no_connections = 4;
$cmd = "mysql -u root -e \"USE radius; INSERT INTO radcheck(username,attribute,op,value) VALUES ('$user','Cleartext-Password',':=','$pass');\"";
$ssh->exec($cmd);
$cmd = "mysql -u root -e \"USE radius; INSERT INTO radcheck(username,attribute,op,value) VALUES ('$user','Simultaneous-Use',':=','$no_connections');\"";
$ssh->exec($cmd);
header( 'Location: [login to view URL]' ) ;
?>
Please let me know if you can help.
Many thanks,
Michael