G
G
griff922019-02-20 19:09:47
PHP
griff92, 2019-02-20 19:09:47

How to intercept HTTP requests from a php script?

I am writing a script in php that accesses a remote server via https, GET requests are mainly sent.
To track requests leaving the script and incoming responses, I did:
1. Installed Fiddler
2. I use Guzzle with the proxy option = '127.0.0.1:8888'
3. I wrote set http_proxy=127.0.0.1:8888 set https_proxy=127.0 on the command line. 0.1:8888
4. I tried to write the same thing in the OpenServer command line
Actions do not lead to requests from the script to the server in Fiddler. I run the script either through the command line, or by accessing the local server.
I want to ensure that the traffic goes through Fiddler's proxy and all requests of my script appear in it in the same form as if I made calls to a remote server through a browser.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shamanov, 2019-02-20
@SilenceOfWinter

I would do according to the manual:
Guzzle with curl adapter curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888');+ console
curl --proxy 127.0.0.1:8888

M
metajiji, 2019-02-21
@metajiji

Mitmproxy and flew

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question