Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- require 'steamauth/steamauth.php';
- require 'steamauth/userInfo.php';
- if(isset($_SESSION['steamid']))
- {
- $id = $_SESSION['steamid'];
- }
- else{
- #not logged in
- }
- ?>
- <html>
- <header><title>This is title</title></header>
- <body>
- Hello world
- </body>
- <?
- if(isset($_SESSION['steamid'])) {?>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img class="img-rounded" src="<?=$steamprofile['avatar'];?>"> <b><?=$steamprofile['personaname'];?></b><b class="caret"></b></a>
- <span class="dropdown-arrow"></span>
- <ul class="dropdown-menu">
- <li><a href="https://www.lifewire.com/how-to-test-a-suspicious-link-without-clicking-it-2487171"> Option 1 </a></li>
- <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>
- <li><a href="https://api.steampowered.com/IDOTA2Match_570/GetMatchHistoryBySequenceNum/v1/?key=6BBA3821AD660B398F38F86552FCE117"> Option 3 </a></li>
- <li><a href="#"> Option 4 </a></li>
- <li class="divider"></li>
- <li><a href="steamauth/logout.php">Logout</a></li>
- </ul>
- </li>
- <? } else {?>
- <li><a href="#" data-toggle="modal" data-target="#loginModal">Login</a></li>
- <? } ?>
- <?
- function add_string_to_array($array, $string){
- array_push($array, $string);
- return $array;
- }
- function look_for_string($word, $text)
- {
- if (strpos($text, $word) !== false) {
- echo $text[55] + $text[56] + $text[57];
- } else {
- echo 'false';
- }
- }
- $file = 'people.txt';
- $homepage = file_get_contents("https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistoryBySequenceNum/v1/?key=....&matches_requested=100");
- file_put_contents($file, $homepage);
- #file_put_contents($file, $homepage);
- look_for_string("match_id",$homepage);
- $offset = 0;
- $index1 = 0;
- for($pages = 0 ; $pages<3; $pages++){
- for ($x = 0; $x <= 100; $x++){
- if(strpos($homepage, "match_id", $offset+10)==false){
- break;
- }
- $match_id_str = "";
- $index1 = strpos($homepage, "match_id", $offset+10);
- $offset = $index1;
- #10 to 16: this is the letters after the search-word "match_id" (the actual number)
- for ($x = 10; $x <= 16; $x++) {
- $match_id_str = $match_id_str.$homepage[$index1+$x];
- }
- echo "offset";
- echo "<br>";
- echo $offset;
- echo "<br>";
- echo "match_id_str";
- echo "<br>";
- echo $match_id_str;
- echo "<br>";
- }
- echo "<br>";
- echo "______________________________";
- echo "<br>";
- $cmd_url = "https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistoryBySequenceNum/v1/?key=....&start_at_match_seq_num=".match_id_str;
- echo "cmd_url: ";
- echo "<br>";
- echo $cmd_url;
- $homepage = file_get_contents("https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistoryBySequenceNum/v1/?key=....");
- echo $homepage;
- echo "<br>";
- file_put_contents($file, $homepage, FILE_APPEND);
- }
- ?>
- <div>
- <?echo loginbutton();?>
- </div>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement