Last active
December 8, 2021 02:26
-
-
Save soyluismunoz/0f62695c2b10d094d4212bce7b5acf52 to your computer and use it in GitHub Desktop.
Tasa dólar banco central de Venezuela (bcv)
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 | |
use Goutte\Client as Goutte; // you need to download the Goutte library | |
function getRateFromBcv() | |
{ | |
$client = new Goutte(); | |
$crawler = $client->request('GET', 'http://www.bcv.org.ve/'); | |
$price_dolar = $crawler->filter('div#dolar div.field-content div.recuadrotsmc div.centrado'); | |
$dolarBcv = $price_dolar->text(); | |
// $dolarBcv = str_replace(",", ".", $dolarBcv); // if you want to change the number format to english enable this line | |
return $dolarBcv ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment