Advertisement
Mauzen

Yahoo.com weather condition filter

Nov 3rd, 2011
1,666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2. $url = $_GET["URL"];
  3. $startstring = "<div id=\"yw-cond\">";
  4.  
  5. $endstring = "<";
  6.  
  7. $file = @fopen ($url,"r");
  8.  
  9.     $i=0;
  10.     while (!feof($file)) {
  11.         $zeile[$i] = fgets($file,2000);
  12.         $i++;
  13.     }
  14.     fclose($file);
  15.  
  16. for ($j=0;$j<$i;$j++) {
  17.     if ($resa = strstr($zeile[$j],$startstring)) {
  18.         $resb = str_replace($startstring, "", $resa);
  19.         $endstueck = strstr($resb, $endstring);
  20.         $resultat .= str_replace($endstueck,"",$resb);
  21.     }
  22. }
  23.  
  24. echo $resultat;
  25. ?>
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement