Skip to content

Instantly share code, notes, and snippets.

@MaskeZen
Created August 16, 2018 14:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MaskeZen/5cc768ae34c998d3970785d245378dea to your computer and use it in GitHub Desktop.
Save MaskeZen/5cc768ae34c998d3970785d245378dea to your computer and use it in GitHub Desktop.
Cotización del BCU WS
<?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);
}
@MaskeZen
Copy link
Author

Lo voy a tener en cuenta, gracias! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment