Advertisement
szabozoltan69

tailor.php

Jul 10th, 2014
320
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/php
  2. <?php
  3. fclose(STDOUT); $STDOUT = fopen('tailed.html', 'w');
  4.  
  5. define('d',"<td");
  6. define('n',"\n");
  7. $f_=file('tailme.html',FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
  8.  
  9. $erdekes=$erdekel=$egysoroslyuk=false;
  10. foreach($f_ as $i=>$f){
  11.     if (strpos($f,'ms-tip-underline')>0)              {$erdekel=true; }
  12.     elseif (strpos($f,'result-table team-matches')>0) {$erdekes=true; }
  13.     elseif (strpos($f,'oddsportal')               >0) {$erdekes=false;}
  14.     if (strpos($f,'gtitle')                       >0) {$egysoroslyuk=true;}
  15.     elseif (strpos($f,'>pen.<')                   >0) {$egysoroslyuk=true;}
  16.     elseif (strpos($f,'> ET<')                    >0) {$egysoroslyuk=true;}
  17.     if ((!$erdekes)&&(!$erdekel)) continue;
  18.     $x=explode(d,$f);
  19.     array_splice($x,7);
  20.     if (!$egysoroslyuk) print implode(d,$x).n;
  21.     $erdekel=$egysoroslyuk=false;
  22. }
  23. ?>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement