Skip to content

Instantly share code, notes, and snippets.

@Lougarou
Created June 23, 2017 06:04
Show Gist options
  • Save Lougarou/e67a6fc7b65124b0799f33d14a6f2c72 to your computer and use it in GitHub Desktop.
Save Lougarou/e67a6fc7b65124b0799f33d14a6f2c72 to your computer and use it in GitHub Desktop.
<?php
$client = new SoapClient("http://www.webservicex.com/globalweather.asmx?WSDL", array('trace' => 1, 'exceptions' => false));
var_dump($client->__getFunctions());
var_dump($client->__getTypes());
$params = [
"CityName" => "San Francisco",
"CountryName" => "United States"
];
$responses = $client->__soapCall("GetWeather", array($params));
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
echo "RESPONSE:\n" . $client->__getLastResponse() . "\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment