|
<?php Die Reisezielseite zum Besuch $url = "http://httpbin.org/ip"; $urls = "https://httpbin.org/ip"; Proxy-Server define("PROXY_SERVER", "tcp://t.16yun.cn:31111"); Informationen zur Tunnelidentität define("PROXY_USER", "16YUN123"); define("PROXY_PASS", "123456"); $proxyAuth = base64_encode(PROXY_USER . ":" . PROXY_PASS); Richte den Proxy-Tunnel ein $tunnel = Rand (1.1000); $headers = implodieren("\r\n", [ "Proxy-Autorisierung: Grundlegend {$proxyAuth}", "Proxy-Tunnel: ${tunnel}", ]); $sniServer = parse_url($urls, PHP_URL_HOST); $options = [ "http" => [ "Proxy" =>PROXY_SERVER, "Header" => $headers, "method" => "GET", 'request_fulluri' => wahr, ], 'ssl' => Array( 'SNI_enabled' => true, // Deaktivieren Sie SNI für HTTPS über HTTP-Proxies 'SNI_server_name' => $sniServer ) ]; Druck($url); $context = stream_context_create($options); $result = file_get_contents($url, falsch, $context); var_dump($result); Besuchen Sie die HTTPS-Seite Druck($urls); $context = stream_context_create($options); $result = file_get_contents($urls, falsch, $context); var_dump($result); ?>
|