Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. <?
  2.  
  3. $host = "";
  4. $port = "";
  5. $username = "";
  6. $password = "";
  7.  
  8. $subject = "VIP Item";
  9. $text = "Tessek, itt a kert itemed! :)";
  10. $itemid = "29434";
  11. $itemcount = "10";
  12. $recipient = "Davidoff";
  13.  
  14.  
  15.   if (isset($port) and
  16.       ($socket=socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) and
  17.       (socket_connect($socket, $host, $port)))
  18.     {
  19.       $output="Connection successful on IP $host, port $port";
  20.       socket_write($socket, "USER ".$username."\n");
  21.       sleep(1);
  22.       socket_write($socket, "PASS ".$password."\n");
  23.       sleep(1);
  24.       socket_write($socket, "send items ".$recipient." \"".$subject."\" \"".$text."\" ".$itemid."[:".$itemcount."]\n");
  25.       sleep(3);
  26.       socket_close($socket);
  27.     }
  28.   else
  29.     { $text="Unable to connect<pre>".socket_strerror(socket_last_error())."</pre>"; }
  30.    
  31.   echo "<html><head></head><body>".
  32.        $output.
  33.        "</body></html>";
  34.  
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement