I'm trying to adapt Google's api to make the currency exchange, but apparently they no longer offer that service. Now I'm trying to scraping to get the current value of the currency, but I do not understand much of that, does anyone have any ideas? since this code does not work for me
$html = file_get_contents('http://www.banrep.gov.co/es/trm'); //Convierte la información de la URL en cadena
preg_match('/<b>(.*)<\/b/i',$html,$contenido);
echo $contenido[1];