Created
August 16, 2018 14:23
-
-
Save MaskeZen/5cc768ae34c998d3970785d245378dea to your computer and use it in GitHub Desktop.
Cotización del BCU WS
This file contains 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 | |
getCotizacionesWS(); | |
function getCotizacionesWS(){ | |
$context = [ | |
"ssl" => [ | |
"verify_peer" => FALSE, | |
"verify_peer_name" => FALSE, | |
'crypto_method' => STREAM_CRYPTO_METHOD_TLS_CLIENT | |
] | |
]; | |
$options = [ | |
'cache_wsdl' => WSDL_CACHE_NONE, | |
'stream_context' => stream_context_create($context) | |
]; | |
$params = [ | |
'Entrada' => [ | |
'FechaDesde' => '2017-10-17', | |
'FechaHasta' => '2017-10-17', | |
'Grupo' => 2, | |
'Moneda' => ['item' => 2225] | |
] | |
]; | |
$client = new SoapClient('https://cotizaciones.bcu.gub.uy/wscotizaciones/servlet/awsbcucotizaciones?wsdl', $options); | |
$response = $client->Execute($params); | |
print_r($response->Salida->datoscotizaciones); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lo voy a tener en cuenta, gracias! 👍