Last active
September 27, 2023 06:49
-
-
Save giansalex/38e63e9146efc9d3bf595c40bcc5503f to your computer and use it in GitHub Desktop.
Use SoapClient PHP with proxy for HTTP/HTTPS connections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parameters = [ | |
'proxy_host' => "127.0.0.1", | |
'proxy_port' => 8888, | |
'stream_context' => stream_context_create( | |
array( | |
'ssl' => array( | |
'verify_peer' => false, | |
'verify_peer_name' => false, | |
) | |
) | |
) | |
]; | |
$client = new \SoapClient('url.wsdl', $parameters); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment