Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/05/2014, 07:39
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 10 meses
Puntos: 379
Respuesta: Capturar datos de una web con preg_match

Seria mas sencillo si usaras: http://simplehtmldom.sourceforge.net/
Código PHP:
Ver original
  1. // Create DOM from URL or file
  2. $html = file_get_html('http://www.google.com/');
  3.  
  4. // Find all images
  5. foreach($html->find('img') as $element)
  6.        echo $element->src . '<br>';
Si hay forma de reutilizar código úsalo!
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.