Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>VIP Item add!</title>
- </head>
- <body>
- Item ID-je:<br>
- <input type="text" name="item" />
- <br />Cimzett (Karakter):<br>
- <input type="text" name="cimzett" /><br />
- <input type="submit" value="Küldés" name="Submit">
- </body>
- </html>
- <?php
- $host = "127.0.0.1";
- $port = "3443";
- $username = "user";
- $password = "pass";
- $subject = "VIP Item";
- $text = "Tessek, itt a kert itemed! :)";
- $itemid = $_POST['item'];
- $itemcount = "1";
- $recipient = $_POST['cimzett'];
- if (isset($port) and
- ($socket=socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) and
- (socket_connect($socket, $host, $port)))
- {
- $text="Connection successful on IP $host, port $port";
- socket_write($socket, "USER ".$username."\n");
- sleep(1);
- socket_write($socket, "PASS ".$password."\n");
- sleep(1);
- socket_write($socket, "send items $recipient \"$subject\" \"$text\" ".$itemid."[:".$itemcount."]\n");
- sleep(3);
- socket_close($socket);
- }
- else
- { $text="Unable to connect<pre>".socket_strerror(socket_last_error())."</pre>"; }
- echo "<html><head></head><body>".
- $text.
- "</body></html>";
- //send items #playername "#subject" "#text" itemid1[:count1] itemid2[:count2] ... itemidN[:countN]
- //send items Davidoff "Test" "Test" 29434[:10]
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement