Guest User

Untitled

a guest
Aug 25th, 2014
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?php
  2. include 'simple_html_dom.php';
  3. require_once 'simple_html_dom.php';
  4. $data = file_get_html('http://acm.timus.ru/author.aspx?id=133892');
  5. set_time_limit(0);
  6.  
  7. if($data->innertext!='' and count($data->find('td'))){
  8.  
  9. foreach($data->find('.accepted') as $a){
  10.  
  11. if (isset($plg->plaintext)) $plgObj = 'plgContent' . ucfirst($plg->plaintext);
  12. $b = $a->plaintext;
  13. $data2 = file_get_html('http://acm.timus.ru/status.aspx?space=1&num='.$b.'&author=133892');
  14. echo "<table><tr><td style = 'color: darkgreen;'>".$b."</td>";
  15. preg_match_all('#
  16. <tr[^>]*>
  17. <td\sclass="id">(.+?)</td>
  18. <td\sclass="date">(.+?)</td>
  19. <td\sclass="coder">(.+?)</td>
  20. <td\sclass="problem">(.+?)</td>
  21. <td\sclass="language">(.+?)</td>
  22. <td\sclass="verdict_ac">Accepted</td>
  23. <td\sclass="test">(.+?)</td>
  24. <td\sclass="runtime">(.+?)</td>
  25. <td\sclass="memory">(.+?)</td>
  26. </tr>
  27. #iSsux', $data2, $matches);
  28. if(!count($matches[0])){
  29. die("Not found");
  30. }
  31. $last = count($matches[0])-1;
  32. echo $matches[0][$last];
  33.  
  34. }
  35. }
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment