Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Indefinite execution
- set_time_limit (0);
- // IP and port
- $strIp = '';
- $intPort = 9000; // 9000 is a good port
- $strClientIP = getHostByName(gethostname());
- // Create a TCP Stream socket
- $resSock = socket_create(AF_INET, SOCK_STREAM, 0);
- // Connect to the server
- socket_connect($resSock, $strIp, $intPort) or die('Could not bind to address');
- socket_write($resSock, 'CONNECT~' . $strClientIP);
- // Close connection with server
- socket_close($resSock);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement