Skip to content

Commit

Permalink
Switch to HTTPS
Browse files Browse the repository at this point in the history
Enable HTTPS for check_authentication query and forceReload() API-call
  • Loading branch information
BlackCetha committed Dec 26, 2016
2 parents a51228a + c6f6731 commit 47952be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions steamauthOOP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private static function validate()
),
));

$result = file_get_contents("http://steamcommunity.com/openid/login", false, $context);
$result = file_get_contents("https://steamcommunity.com/openid/login", false, $context);

// Validate wheather it's true and if we have a good ID
preg_match("#^http://steamcommunity.com/openid/id/([0-9]{17,25})#", $_GET['openid_claimed_id'], $matches);
Expand All @@ -112,7 +112,7 @@ function loggedIn() {
}
function forceReload() {
if (!isset($_SESSION["steamdata"]["steamid"])) return false; // User is not logged in, nothing to reload
@$apiresp = json_decode(file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$this->settings["apikey"]."&steamids=".$_SESSION["steamdata"]["steamid"]),true);
@$apiresp = json_decode(file_get_contents("https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$this->settings["apikey"]."&steamids=".$_SESSION["steamdata"]["steamid"]),true);
foreach ($apiresp["response"]["players"][0] as $key => $value) $_SESSION["steamdata"][$key] = $value;
foreach ($_SESSION["steamdata"] as $key => $value) $this->{$key} = $value; // Make user-data accessable through $steam->var
return true;
Expand Down

0 comments on commit 47952be

Please sign in to comment.