Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active September 27, 2023 06:49
Show Gist options
  • Save giansalex/38e63e9146efc9d3bf595c40bcc5503f to your computer and use it in GitHub Desktop.
Save giansalex/38e63e9146efc9d3bf595c40bcc5503f to your computer and use it in GitHub Desktop.
Use SoapClient PHP with proxy for HTTP/HTTPS connections
<?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