Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- /* ET color codes */
- span.cp { color: #000000; }
- span.cq { color: #ff0000; }
- span.cr { color: #00ff00; }
- span.cs { color: #dddd00; }
- span.ct { color: #0000ff; }
- span.cu { color: #00ffff; }
- span.cv { color: #ff00ff; }
- span.cx { color: #ffa500; }
- span.cy { color: #808080; }
- span.cb { color: #008080; }
- span.cc { color: #800080; }
- span.cd { color: #0066cc; }
- span.ce { color: #6600cc; }
- span.cf { color: #3399cc; }
- span.cg { color: #ccffcc; }
- span.ch { color: #006633; }
- span.ci { color: #990033; }
- span.cj { color: #993333; }
- span.ck { color: #993300; }
- span.ca { color: #cc9966; }
- span.cm { color: #999966; }
- span.cn { color: #cccc99; }
- span.co { color: #cccc66; }
- /* end */
- fieldset {
- border: 2px solid #FFD292;
- border-radius: 10px;
- }
- </style>
- <?
- function br()
- {
- echo "</br>\n";
- }
- //page generating time
- $time = microtime();
- $time = explode(' ', $time);
- $time = $time[1] + $time[0];
- $start = $time;
- $url='http://www.gamestv.org/event/33955-dead-ringers-vs-to-make-odds-even/'.'statistics';
- $a = file_get_contents($url);
- echo "<a href=\"$url\" >$url</a>";
- br();
- $map_c=1;
- $stats_start=strpos($a,"<div class=\"matchStats\"");
- $a=substr($a,$stats_start,strpos($a,"View plaintext endround stats")-$stats_start); //cuts content to only data i need
- $c=strlen($a);
- $l=strpos($a,'" class="k">');
- while (!$l===false)
- {
- //echo $l;br();
- //echo strlen($a);br();
- $name_pos=strpos($a,'<td class="left playername">'); //this text is always before player name
- $map_pos=strpos($a,'</legend><table rules="groups"'); //this text is always after map name
- if ($l>$map_pos)
- {
- echo substr($a,strrpos(substr($a,0,$map_pos),' '),$map_pos-strrpos(substr($a,0,$map_pos),' '));br();
- $map_c++;
- }
- if ($l>$name_pos)
- {
- $offs=strpos(substr($a,$name_pos),"</td>");
- echo substr($a,$name_pos+28,$offs-28).":";br();
- }
- //parsing time
- $kill=substr($a,strrpos(substr($a,0,$l),'<span title="')+13,$l-13-strrpos(substr($a,0,$l),'<span title="'));
- $timek=substr($kill,strrpos($kill,'(')+1,strrpos($kill,')')-1-strrpos($kill,'('));
- $token=strtok($timek, ':');
- $m = $token;
- $token=strtok(":");
- $s=$token;
- $time_s=$m+60*s;
- echo $kill."__".$m.":".$s;
- br();
- $a=substr($a,$l+1); //cutting content
- $l=strpos($a,'" class="k">');
- }
- ?>
- <?php
- //page generating time
- $time = microtime();
- $time = explode(' ', $time);
- $time = $time[1] + $time[0];
- $finish = $time;
- $total_time = round(($finish - $start), 4);
- echo 'Page generated in '.$total_time.' seconds.';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement