1. Go to this page and download the library: Download alexya-framework/sockswork library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexya-framework / sockswork example snippets
$SocksWork = new SocksWork("localhost", 8080, 100); // Connects to localhost:8080 and sets a timeout of 100ms
$SocksWork->send((binary) "Hello world!");
echo $SocksWork->response; // Response to the packet
$packet = new PacketBuilder();
$packet->writeString("message", "Hello World!");
$SocksWork->send($packet);
echo $packet->readString("response"); // Response to the packet