PHP code example of kinzal / sstp

1. Go to this page and download the library: Download kinzal/sstp 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/ */

    

kinzal / sstp example snippets


$sstp = new SSTP();
$sstp->message = '
    SEND SSTP/1.1
    Sender: カードキャプター
    Script: \h\s0汝のあるべき姿に戻れ。\e
    Option: nodescript,notranslate
    Charset: Shift_JIS
';
$response = $sstp->send('127.0.0.1', 9801, 2);

echo $response; // -> SSTP/1.1 200 OK\r\n