Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP/Curl monitoring using Fiddler

I've been doing some http requests recently using php and curl and wanted to analyze the requests and responses with fiddler. The machine running the php scripts is on a linux vps and fiddler is running on a windows machine with an open port. This should work but everytime I use the CURLOPT_PROXY option in curl_setopt, it uses an HTTP Tunnel to connect to fiddler and the requests and responses do not appear. Is there an option I can use to fix this?

I've also tried: curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, FALSE); to no avail

like image 648
user1250876 Avatar asked Mar 05 '12 22:03

user1250876


1 Answers

I think you have to explicitly specify the ip-address:host of fiddler after curl_init() as follows:

curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888');

more details here

like image 99
Birhanu Eshete Avatar answered Sep 25 '22 02:09

Birhanu Eshete