Advertisement
Guest User

Untitled

a guest
Jun 14th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. <?
  2.  
  3. require 'steamauth/steamauth.php';
  4. require 'steamauth/userInfo.php';
  5.  
  6. if(isset($_SESSION['steamid']))
  7. {
  8. $id = $_SESSION['steamid'];
  9.  
  10. }
  11. else{
  12.  
  13. #not logged in
  14.  
  15. }
  16.  
  17.  
  18. ?>
  19.  
  20.  
  21.  
  22.  
  23. <html>
  24. <header><title>This is title</title></header>
  25. <body>
  26. Hello world
  27. </body>
  28.  
  29.  
  30. <?
  31.  
  32. if(isset($_SESSION['steamid'])) {?>
  33. <li class="dropdown">
  34. <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img class="img-rounded" src="<?=$steamprofile['avatar'];?>"> <b><?=$steamprofile['personaname'];?></b><b class="caret"></b></a>
  35. <span class="dropdown-arrow"></span>
  36. <ul class="dropdown-menu">
  37. <li><a href="https://www.lifewire.com/how-to-test-a-suspicious-link-without-clicking-it-2487171"> Option 1 </a></li>
  38. <li><a href="https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?format=json&key=....&skill=1&min_players=10&matches_requested=100&start_at_match_id =3951993396"> Option 2 </a></li>
  39. <li><a href="https://api.steampowered.com/IDOTA2Match_570/GetMatchHistoryBySequenceNum/v1/?key=6BBA3821AD660B398F38F86552FCE117"> Option 3 </a></li>
  40. <li><a href="#"> Option 4 </a></li>
  41. <li class="divider"></li>
  42. <li><a href="steamauth/logout.php">Logout</a></li>
  43. </ul>
  44. </li>
  45. <? } else {?>
  46. <li><a href="#" data-toggle="modal" data-target="#loginModal">Login</a></li>
  47. <? } ?>
  48.  
  49. <?
  50.  
  51. function add_string_to_array($array, $string){
  52.  
  53.  
  54. array_push($array, $string);
  55.  
  56.  
  57.  
  58. return $array;
  59.  
  60.  
  61.  
  62. }
  63.  
  64.  
  65. function look_for_string($word, $text)
  66. {
  67.  
  68. if (strpos($text, $word) !== false) {
  69. echo $text[55] + $text[56] + $text[57];
  70. } else {
  71. echo 'false';
  72. }
  73.  
  74.  
  75.  
  76. }
  77.  
  78.  
  79.  
  80.  
  81. $file = 'people.txt';
  82. $homepage = file_get_contents("https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistoryBySequenceNum/v1/?key=....&matches_requested=100");
  83. file_put_contents($file, $homepage);
  84.  
  85. #file_put_contents($file, $homepage);
  86.  
  87. look_for_string("match_id",$homepage);
  88.  
  89. $offset = 0;
  90.  
  91. $index1 = 0;
  92.  
  93.  
  94. for($pages = 0 ; $pages<3; $pages++){
  95.  
  96.  
  97. for ($x = 0; $x <= 100; $x++){
  98.  
  99.  
  100.  
  101. if(strpos($homepage, "match_id", $offset+10)==false){
  102.  
  103.  
  104.  
  105. break;
  106. }
  107.  
  108. $match_id_str = "";
  109. $index1 = strpos($homepage, "match_id", $offset+10);
  110. $offset = $index1;
  111.  
  112. #10 to 16: this is the letters after the search-word "match_id" (the actual number)
  113. for ($x = 10; $x <= 16; $x++) {
  114. $match_id_str = $match_id_str.$homepage[$index1+$x];
  115. }
  116.  
  117. echo "offset";
  118. echo "<br>";
  119. echo $offset;
  120. echo "<br>";
  121. echo "match_id_str";
  122. echo "<br>";
  123. echo $match_id_str;
  124. echo "<br>";
  125.  
  126.  
  127.  
  128. }
  129. echo "<br>";
  130. echo "______________________________";
  131. echo "<br>";
  132.  
  133. $cmd_url = "https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistoryBySequenceNum/v1/?key=....&start_at_match_seq_num=".match_id_str;
  134.  
  135.  
  136. echo "cmd_url: ";
  137. echo "<br>";
  138. echo $cmd_url;
  139.  
  140.  
  141. $homepage = file_get_contents("https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistoryBySequenceNum/v1/?key=....");
  142. echo $homepage;
  143. echo "<br>";
  144. file_put_contents($file, $homepage, FILE_APPEND);
  145. }
  146.  
  147. ?>
  148.  
  149. <div>
  150. <?echo loginbutton();?>
  151.  
  152. </div>
  153.  
  154.  
  155. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement