I am using a PHP script in Windows to make a curl request to successfully make a SOAP request, and I’m trying to track down exactly how this successful request is made to replicate it in C#.NET.
How can I use PHP to detect which proxy server curl is going to use?
I was hoping there might be a curl_getopt in php curl, so I could do something like:
curl_getopt(CURLOPT_PROXY);
but alas it doesn’t exist.
Is there any way for me to find out which proxy server php curl will be connecting through?
1. You tell curl what proxy to use, and not viaversa:
2. Another solution >
And look at this answer > How to get an option previously set with curl_setopt()?
3. Override curl_setopt() function
http://php.net/manual/en/function.override-function.php
p.s. you should probably need http://php.net/manual/en/function.rename-function.php
4. Use runkit to override functions
http://php.net/manual/en/book.runkit.php