Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/03/2012, 09:42
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 9 meses
Puntos: 793
Respuesta: Extraer contenido de una tabla de otra web

Puedes usar por ejemplo las clases DOM

Código PHP:
Ver original
  1. <?php
  2. $doc = new DOMDocument();
  3. $doc->loadHTML(file_get_contents('http://www.imdb.com/title/tt0072431/'));
  4. $td = $doc->getElementById('img_primary');
  5. $img = $td->getElementsByTagName('img');
  6. echo $img->item(0)->getAttribute('src');
  7. //http://ia.media-imdb.com/images/M/MV5BMTc2MzgwNjAzNV5BMl5BanBnXkFtZTcwNTUyNjQzMQ@@._V1._SY317_CR7,0,214,317_.jpg
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP