Skip to content

Instantly share code, notes, and snippets.

@phondanai
Created February 16, 2018 03:31
Show Gist options
  • Save phondanai/3aa853f11a3a6554677db7bca1d30c35 to your computer and use it in GitHub Desktop.
Save phondanai/3aa853f11a3a6554677db7bca1d30c35 to your computer and use it in GitHub Desktop.
Get current oil price from PTT SOAP web service using simple SOAP call from PHP.
<?php
$client = new SoapClient("http://www.pttplc.com/webservice/pttinfo.asmx?wsdl");
//echo("func");
var_dump($client->__getFunctions());
//echo("types");
var_dump($client->__getTypes());
$params = array(
'Language' => 'th' // 'en' for English result
);
$response = $client->CurrentOilPrice($params);
var_dump($response);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment