-
-
Save Wohaho/c0aadc187fe8f6eba57ede676ae8980d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['inputCommand'])){ | |
$command = $_POST['inputCommand']; | |
if($command == null) die("Please write a comm"); | |
$host = "217.182.41.72"; | |
$password = "456789asd"; | |
$port = 9876; | |
require_once("WebsenderAPI.php"); // Load Library | |
$wsr = new WebsenderAPI($host,$password,$port); // HOST , PASSWORD , PORT | |
if($wsr->connect()){ //Open Connect | |
$wsr->sendCommand($command /* "эnputCommand" here! */); | |
}else{ | |
die("Connection error! Check ip, pass and port."); | |
} | |
$wsr->disconnect(); //Close connection. | |
} | |
?> | |
<center> | |
<br><br><br> | |
<form method="POST"> | |
<input type="text" name="inputCommand" placeholder="Write a command!"> | |
<input type="submit" value="Send!"> | |
</form> | |
</center> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment