Advertisement
ujiajah1

server.php

May 16th, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.36 KB | None | 0 0
  1. <?php
  2.  
  3. function bacaHTML($url){
  4.      // inisialisasi CURL
  5.      $data = curl_init();
  6.      // setting CURL
  7.      curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
  8.      curl_setopt($data, CURLOPT_URL, $url);
  9.      // menjalankan CURL untuk membaca isi file
  10.      $hasil = curl_exec($data);
  11.      curl_close($data);
  12.      return $hasil;
  13. }
  14. $memory = shell_exec ('free -m');
  15. $hardisk = shell_exec ('df -h ');
  16. $release = shell_exec ('lsb_release -a');
  17. $proxy = fopen("http://172.16.0.2/bonbingrabb/squid.txt", "r");
  18. $kodeHTML =  bacaHTML('http://172.16.0.2/bonbingrabb/index.php');
  19. $center = "<center>";
  20. $akhircenter = "</center>";
  21. $mamamyuk = explode('<p class="gambar">', $kodeHTML);
  22. $mamamLagi = explode('</p>', $mamamyuk[1]);
  23. echo $center;
  24. echo $mamamLagi[0];
  25. echo '<br><br>';
  26. echo '<h1 style="color:CC0000; font-size:18px;"><b>INI SERVER SAYA<br><br>';
  27. echo "<table border='1'  width='700'><tr>";
  28. echo '<th align="left">Spesifik Release Name</th>' ;
  29. echo '<th align="left">kapasitas memorynya</th>' ;
  30. echo '<th align="left">kapasitas Hardisknya</th>' ;
  31. echo '<th align="left">proxy server</th>' ;
  32. echo "</tr>";
  33. echo "<tr>";
  34. echo "<td>$release</td>";
  35. echo "<td>$memory</td>";
  36. echo "<td>$hardisk</td>";
  37. echo '<td width:"100%">fread($proxy, filesize("server.txt"));
  38.  
  39. fclose($file);
  40. </td>';
  41. echo "</tr>";
  42. echo '</table>';
  43.  
  44. echo '</h1></b>';
  45. echo $akhircenter;
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement