Advertisement
Guest User

Untitled

a guest
Jul 24th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <html>
  2.     <head>
  3.     </head>
  4.     <body>
  5.     <?php
  6.         $host = "192.168.0.12";
  7.         $port = 1337;
  8.         $fp = fsockopen ($host, $port);
  9.         if (!$fp) {
  10.             $result = "Error: could not open socket connection";
  11.         } else {
  12.             // write the user string to the socket
  13.             $arr = array('commandType' => 'togglePause');
  14.             $message = json_encode($arr);
  15.             fwrite($fp, '1');
  16.             fwrite($fp, 'H3X!');
  17.             fwrite($fp, strlen($message));
  18.             fwrite($fp, $message);
  19.             $result = "SENT";
  20.             fclose ($fp);
  21.         }
  22.         echo "1";
  23.         echo "H3X!";
  24.         echo strlen($message);
  25.         echo $message;
  26.     ?>
  27.     </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement