Posted By

jnbn on 10/11/09


Tagged

phpregular expressionregexp


Versions (?)

Find page title


 / Published in: PHP
 

  1. $fp = fopen("http://www.catswhocode.com/blog","r");
  2. while (!feof($fp) ){
  3. $page .= fgets($fp, 4096);
  4. }
  5.  
  6. $titre = eregi("<title>(.*)</title>",$page,$regs);
  7. echo $regs[1];
  8. fclose($fp);

Report this snippet  

You need to login to post a comment.