Closed doZennn closed 9 years ago
You need to include steamauth before any text output.
I have require 'steamauth/steamauth.php';
directly after my opening <?php
tag if that's what you mean, it still dosen't work.
Not only after your php tag. It needs to be infront of ANY text output like so:
<?php
include "steamauth.php";
?>
blablabla
<?php
more php code
?>
Wow! Blablabla!!! Keep up the good work! Op 13 jul. 2015 19:59 schreef "BlackCetha" notifications@github.com:
Not only after your php tag. It needs to be infront of ANY text output like so:
<?phpinclude "steamauth.php";?> blablabla<?phpmore php code?>
— Reply to this email directly or view it on GitHub https://github.com/SmItH197/SteamAuthentication/issues/68#issuecomment-121007152 .
Are you serious? Where is this comment constructive and anywhere close to neccessary? Apart from that, it is just a sample text. I could replace it with "lorem ipsum" if you want.
So that didn't work, so i made a small test site to make sure another part of my code wasn't interfering and its still not working. I'm still a bit new to PHP so perhaps you can take a look?
<?php require __DIR__ . '/steamauth/steamauth.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<?php
if(!isset($_SESSION['steamid'])) {
echo steamlogin();
} else {
include ('steamauth/userInfo.php');
echo '<img src="' .$steamprofile['avatar']. '">';
echo logoutbutton();
}
?>
</body>
</html>
<?php
$steamauth['apikey'] = "REDACTED"; // Your Steam WebAPI-Key found at http://steamcommunity.com/dev/apikey
$steamauth['domainname'] = "localhost"; // The main URL of your website displayed in the login page
$steamauth['buttonstyle'] = "large_no"; // Style of the login button [small|large_no|large]
$steamauth['logoutpage'] = ""; // Page to redirect to after a successfull logout (from the directory the SteamAuth-folder is located in) - NO slash at the beginning!
$steamauth['loginpage'] = "../logincheck/"; // Page to redirect to after a successfull login (from the directory the SteamAuth-folder is located in) - NO slash at the beginning!
// System stuff
if (empty($steamauth['apikey'])) {die("<div style='display: block; width: 100%; background-color: red; text-align: center;'>SteamAuth:<br>Please supply an API-Key!</div>");}
if (empty($steamauth['domainname'])) {$steamauth['domainname'] = "localhost";}
if ($steamauth['buttonstyle'] != "small" and $steamauth['buttonstyle'] != "large") {$steamauth['buttonstyle'] = "large_no";}
?>
<?php
echo 'just work already';
Try changing it to $steamauth['loginpage'] = "logincheck/";
Tried that, Didn't work.
Add me on steam and well get that sorted out. http://steamcommunity.com/id/blackcetha
In the config file this does not do anything: