PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- "countryName" => "UK",
- "stateOrProvinceName" => "Somerset",
- "localityName" => "Glastonbury",
- "organizationName" => "The Brain Room Limited",
- "organizationalUnitName" => "PHP Documentation Team",
- "commonName" => "Wez Furlong",
- "emailAddress" => "wez@example.com"
- );
- $pem_passphrase = 'comet';
- $pemfile = './server.pem';
- $server = stream_socket_server('ssl://127.0.0.1:2000', $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
- while(true)
- {
- $buffer = '';
- print "waiting...";
- if( $client )
- {
- // Read until double CRLF
- // Respond to client
- . "Connection: close\r\n"
- . "Content-Type: text/html\r\n"
- . "\r\n"
- . "<pre>{$buffer}</pre>");
- } else {
- print "error.\n";
- }
- }
- ?>