Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/08/2014, 13:44
Avatar de phercin
phercin
 
Fecha de Ingreso: febrero-2009
Ubicación: Pachuca Hidalgo
Mensajes: 150
Antigüedad: 15 años, 2 meses
Puntos: 1
Pregunta Obtener un texto extraido de una web (Tipo de Cambio)

Saludos, he buscado mucho la manera de mostrar en mi web el tipo de cambio de USD a MXN, solo quiero el texto, por ejemplo : 13.05
y mostrarlo en mi web como tipo de cambio...

Vi un post donde obtienen con un código esos valores, el codigo es:

Código PHP:
$datafeedfile_get_contents("http://rate-exchange.appspot.com/currency?from=USD&to=MXN");
$obj json_decode($datafeed);
echo 
$obj->{'rate'}; 
en PHP.
Pero no funciona, me aparece el siguiente error:

Código:
Warning: file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/betravel/public_html/plantilla.php on line 23

Warning: file_get_contents(http://rate-exchange.appspot.com/currency?from=USD&to=MXN) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/betravel/public_html/plantilla.php on line 23
Que estará mal?


Agradezco su ayuda,,, saludos...