Guest User

Untitled

a guest
Jul 3rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $(document).ready(function(){
  2. $("button").on('click', function() {
  3. console.log("im in here now!");
  4. $.get("../lib/usbGenerateReport.php", function(data){
  5. $( "#statusOutput" ).val(data);
  6. console.log("im in here now!");
  7. });
  8. });
  9. });
  10.  
  11. <?php //getoutput.php
  12.  
  13. $user = 'user';
  14. $password = 'pass';
  15. $path = '/my/path';
  16. $gateway = '10.139.X.X';
  17.  
  18. if ($_SERVER['REQUEST_METHOD'] == 'GET'){
  19. echo "get request received!";
  20. $report = file_get_contents("ftp://$user:$password@$gateway/$path");
  21. echo $report;
  22. }
  23. ?>
Add Comment
Please, Sign In to add comment