Update proxytest.php

This commit is contained in:
Namhyeon Go 2022-10-06 21:48:49 +09:00 committed by GitHub
parent 1b48ca481b
commit 370415536e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,10 +6,9 @@
ini_set("default_socket_timeout", 1); // must be. because of `feof()` works ini_set("default_socket_timeout", 1); // must be. because of `feof()` works
ini_set("max_execution_time", 0); ini_set("max_execution_time", 0);
function parse_headers($str) { // Parses HTTP headers into an array
// https://stackoverflow.com/questions/16934409/curl-as-proxy-deal-with-https-connect-method // https://stackoverflow.com/questions/16934409/curl-as-proxy-deal-with-https-connect-method
// https://stackoverflow.com/questions/12433958/how-to-parse-response-headers-in-php // https://stackoverflow.com/questions/12433958/how-to-parse-response-headers-in-php
function parse_headers($str) { // Parses HTTP headers into an array
$headers = array(); $headers = array();
$lines = preg_split("'\r?\n'", $str); $lines = preg_split("'\r?\n'", $str);