Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php通过一个没有curl的代理_Php - Fatal编程技术网

php通过一个没有curl的代理

php通过一个没有curl的代理,php,Php,如何通过localhost:8888代理连接php,以便fiddler能够调试php网络流量?如何在不使用curl库的情况下实现这一点?改为使用fsockopen.,与fwrite和fread一起使用 $o = array( 'http'=> array( 'method'=>"GET", 'header'=>"User-Agent: ...\r\n". "Accept-Language: en-US,en;q=0.8\r

如何通过localhost:8888代理连接php,以便fiddler能够调试php网络流量?如何在不使用curl库的情况下实现这一点?改为使用fsockopen.,与fwrite和fread一起使用

$o = array(
    'http'=> array(
        'method'=>"GET",
        'header'=>"User-Agent: ...\r\n".
        "Accept-Language: en-US,en;q=0.8\r\n",
        'proxy' => 'localhost:8888')
  );            


$x = stream_context_create($o);

$file = file_get_contents('http://www.....com',false,$x);