SHARE
TWEET

Untitled

a guest Jun 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $server_host = "127.0.0.1";
  3. $server_port = 1919;
  4. $pass = "";
  5. set_time_limit(0);
  6. error_reporting(E_ALL);
  7. $server = array();
  8. $server['SOCKET'] = fsockopen($server_host, $server_port, $errno, $errstr, 5);
  9. if($server['SOCKET']){
  10.     while(!feof($server['SOCKET'])){
  11.         $server['READ_BUFFER'] = htmlentities(fgets($server['SOCKET'], 1024));
  12.         if($server['READ_BUFFER'] != ""){
  13.             echo date("[d/m/Y H:i:s]")." ".$server['READ_BUFFER']."<br>\r\n";
  14.         }
  15.         //code
  16.         flush();
  17.     }
  18. }
  19.  
  20. function SendCommand($cmd){
  21.     global $server;
  22.     global $searchfor;
  23.     global $replacewith;
  24.     fwrite($server['SOCKET'], $cmd, strlen($cmd));
  25.     echo date("[d/m/Y H:i:s]")."[SEND] ".preg_replace($searchfor,$replacewith,$cmd)." <br>";
  26. }
  27. ?>
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top