Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'simple_html_dom.php';
- require_once 'simple_html_dom.php';
- $data = file_get_html('http://acm.timus.ru/author.aspx?id=133892');
- set_time_limit(0);
- if($data->innertext!='' and count($data->find('td'))){
- foreach($data->find('.accepted') as $a){
- if (isset($plg->plaintext)) $plgObj = 'plgContent' . ucfirst($plg->plaintext);
- $b = $a->plaintext;
- $data2 = file_get_html('http://acm.timus.ru/status.aspx?space=1&num='.$b.'&author=133892');
- echo "<table><tr><td style = 'color: darkgreen;'>".$b."</td>";
- preg_match_all('#
- <tr[^>]*>
- <td\sclass="id">(.+?)</td>
- <td\sclass="date">(.+?)</td>
- <td\sclass="coder">(.+?)</td>
- <td\sclass="problem">(.+?)</td>
- <td\sclass="language">(.+?)</td>
- <td\sclass="verdict_ac">Accepted</td>
- <td\sclass="test">(.+?)</td>
- <td\sclass="runtime">(.+?)</td>
- <td\sclass="memory">(.+?)</td>
- </tr>
- #iSsux', $data2, $matches);
- if(!count($matches[0])){
- die("Not found");
- }
- $last = count($matches[0])-1;
- echo $matches[0][$last];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment