Guest User

Untitled

a guest
Feb 25th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2. function curl($url){
  3.    
  4. $ch = curl_init($url);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  6. $page=curl_exec($ch);
  7. curl_close($ch);
  8. return $page;
  9. }
  10.     $kod = 'http://www.forum.php.pl/
  11. http://www.forum.php.pl/
  12. http://www.forum.php.pl/
  13. http://www.phpedia.pl/wiki/Specjalna:Ostatnie_zmiany/';
  14.      
  15.     $exp = explode("\n", $kod);
  16.    
  17.  
  18.    
  19.     $ile_exp = count($exp);
  20.     $ilescan=0;
  21.      
  22.     for($x = 0; $x < $ile_exp; $x++)
  23.     {
  24.      
  25.     $down_html = curl($exp[$x]);
  26.    
  27.    
  28.      
  29.      
  30.     if(!preg_match('/Przedszkole/', $down_html))
  31.     {
  32.     $ilescan++;
  33.      
  34.     }
  35.     }
  36.    
  37.     echo $ilescan;
  38.  
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment