I am quite new with PHP, but trying to run a keygenerator script on my ubuntu/apache webserver.
I want it to look like this on a website, and when i enter serialnr it generate a password.
The keygenerator script it self i have tested in php with ssh2.
What i need is how to make the fill in textbox come to the “serial” in keygen example (0Z35000711) and write a readable output.
If i run this script belov the php shows me the password.
Anybody please help?
<?php $host = '192.168.1.9'; $port = 22; $username = 'user'; $password = 'password'; $connection = ssh2_connect($host, $port); ssh2_auth_password($connection, $username, $password); $stream = ssh2_exec($connection, '/home/plex/Desktop/pwgen/gkey.sh 0Z35000711'); stream_set_blocking($stream, true); $output = stream_get_contents($stream); echo "<pre>"; print_r($output); echo "<pre>"; ?>