Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action=""method="post">
- Username:<br><input type="text" name="user" size="20" tabindex="1">
- Password:<br><input type="password" name="password" size="20" tabindex="2">
- <!-- -->
- <select name="ValueName" size="32" tabindex="3">
- <option value="MyValue1">ValueExample1</option>
- <option value="MyValue2">ValueExample2</option>
- <!-- -->
- <button type="submit" style="text-align: left; width:170px; height:25px;
- float:left; " name="test">Test1</button>
- <button type="submit" style="text-align: left; width:170px; height:25px;
- float:left; " name="test2">Test2</button>
- <!-- Php Section -->
- <?php
- $user = $_POST['user'];
- $password = $_POST['password'];
- $ValueName = $_POST['ValueName'];
- $test = $_POST['Test'];
- $test2 = $_POST['Test2'];
- if (isset($_POST['test']))
- $cmd = "/usr/bin/curl -k --user $user:$password https://IPADDRESS/DIR1/$ValueName";
- if (isset($_POST['test2']))
- $cmd = "/usr/bin/curl -k --user $user:$password https://IPADDRESS/DIR2/$ValueName";
- while (@ ob_end_flush()); // end all output buffers if any
- $proc = popen($cmd, 'r');
- echo '<pre>';
- while (!feof($proc))
- {
- echo fread($proc, 4096);
- @ flush();
- }
- echo '</pre>';
- ?>
- <select name="ValueName2" size="32" tabindex="3">
- <option value="MyValue1">ValueExample1</option>
- <option value="MyValue2">ValueExample2</option>
- $ValueName2 = $_POST['ValueName2'];
- if (isset($_POST['test2']))
- $cmd = "/usr/bin/curl -k --user $user:$password https://IPADDRESS/DIR2/$ValueName2";
Add Comment
Please, Sign In to add comment