Skip to content

Instantly share code, notes, and snippets.

View ravahdati's full-sized avatar

Rasool Vahdati ravahdati

View GitHub Profile
@ravahdati
ravahdati / php-soap.php
Last active February 28, 2024 09:23 — forked from akalongman/php-soap.php
PHP soap client example
// Setting SOAP configuration to disable WSDL caching and adjust socket timeout
ini_set('soap.wsdl_cache_enabled', 0); // Disable WSDL caching
ini_set('soap.wsdl_cache_ttl', 900); // Set the time to live for cached WSDL files to 900 seconds (15 minutes)
ini_set('default_socket_timeout', 15); // Set the default socket timeout to 15 seconds
// Define parameters for the SOAP request
$params = array('param1'=>$param1);
// Define the WSDL URL
$wsdl = 'http://service_url/method?WSDL';