Ver Mensaje Individual
  #5 (permalink)  
Antiguo 10/02/2012, 11:37
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 13 años, 7 meses
Puntos: 793
Respuesta: Curl->Obtener texto principal de una web

Cita:
Iniciado por neuronic Ver Mensaje
Buenas yo usaria file_get_contents (PHP 4 >= 4.3.0, PHP 5)

su uso es muy facil
Código PHP:
$content file_get_contents('url a obtener'
y despues para filtrar partes del html puedes usar expresiones regulares, si buscas por el sr google "extract links for page in php"

o bien si te sirve el enlace
http://4rapiddev.com/php/php-parse-t...rom-a-website/
Cuando hicieron ese script, será que no sabian que existe la función get_meta_tags?


Código PHP:
Ver original
  1. <?php
  2. $tags = get_meta_tags('http://www.forosdelweb.com/');
  3.  
  4. echo '<pre>';
  5. print_r($tags);
  6. echo '</pre>';
__________________
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