Ver Mensaje Individual
  #7 (permalink)  
Antiguo 28/03/2012, 11:34
Avatar de backend
backend
 
Fecha de Ingreso: mayo-2004
Ubicación: chile
Mensajes: 135
Antigüedad: 19 años, 11 meses
Puntos: 0
Respuesta: Obtener datos desde web externa con php pero no funcionan los links

Código PHP:
echo preg_replace('/(MIWEB\.com\/eqcenter)/''earthquake.usgs.gov/earthquakes'$tiempo[1][0]) 
Lo utilizé asi y no funca, sigue igual el asunto.

Código PHP:
<?php
$options 
= array('http' => array(
'method'  => 'GET',
));

$configstream_context_create($options);
$config_final=file_get_contents('http://earthquake.usgs.gov/earthquakes/recenteqsww/Maps/region/S_America_eqs.php',false$config);
preg_match_all("|<a name=\"listtop\">(.*)</table>|sU"$config_final$tiempo);
echo 
preg_replace('/(miweb\.com\/eqcenter)/''earthquake.usgs.gov/earthquakes'$tiempo[1][0])

?>