Created
February 16, 2018 03:31
-
-
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.
This file contains hidden or 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 | |
$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