Hello, I am making this website and I have it almost done and I'm wondering how to setup OpenID, I keep trying using every tutorial but still can't get it to work. Can anyone explain? Maybe other tutorials are outdated. But I really need this, please.
You can try to use this
[url]https://github.com/SmItH197/SteamAuthentication[/url]
Its pretty simple, all you do is include the files in the php and call the functions.
Thank you for that. Is there some sort of +Rep button?
[editline]11th February 2015[/editline]
I did everything it said but it still isn't working...
Perhaps you can try asking your question on Stackoverflow.com
I always try asking them [B]absolutely everything[/B] whenever I have any errors with anything.
Half the time I even solve them just by trying to write out the question thoroughly enough for other people to understand
[QUOTE=VortexZ;47121007]Thank you for that. Is there some sort of +Rep button?
[editline]11th February 2015[/editline]
I did everything it said but it still isn't working...[/QUOTE]
whats the actual error
It should be pretty straightforward to use.
Include this at the top of the page before any other php code and after any ob_start(); etc.
[code]require('steamauth/steamauth.php');[/code]
Then where you want the login button to display or user info and logout button if user is logged in.
[code]
if (!isset($_SESSION['steamid'])) {
steamlogin();
}
else {
include('steamauth/userinfo.php');
// Add some code here to display user data
logoutbutton(); //Logout Button
}
[/code]
These are the variables you can use to display data (shamelessly plagiarized)
[code]
$steamprofile['steamid'] - The users unique SteamID
$steamprofile['communityvisibilitystate'] - This represents whether the profile is visible or not.
$steamprofile['profilestate'] - If set, indicates the user has a community profile configured (will be set to '1')
$steamprofile['personaname'] - Their current set profile name
$steamprofile['lastlogoff'] - Last time the user was online in unix time
$steamprofile['profileurl'] - The URL to their steam profile
$steamprofile['avatar'] - The image URL to the smallest size of their avatar (32px x 32px)
$steamprofile['avatarmedium'] - The image URL to the medium sized version of their avatar (64px x 64px)
$steamprofile['avatarfull'] - The image URL to the largest size of their avatar (184px x 184px)
$steamprofile['personastate'] - The users current state, 1 - Online, 2 - Busy, 3 - Away, 4 - Snooze, 5 - looking to trade, 6 - looking to play
$steamprofile['realname'] - Get the real name
$steamprofile['primaryclanid'] - The users primary group
$steamprofile['timecreated'] - When the account was created
$_SESSION['steam_uptodate'] - Set to false to refresh data from Steam
[/code]
Should be as simple as that, of course, make sure that you have edited steamauth/settings.php properly and have obtained an API key for the correct domain.
I did all of that, there's no error but the login button is not showing up, I made it somehow to just show log in, at first it said: "Put your api key in settings" I did that and then when I click it just said ERROR 404
You should try the example.php in the files along with steamauth, if it doesn't work with that, there may be a problem with your server/PHP configuration.
If you do try example.php and it doesn't work correctly, please check your error.log for any PHP errors if you have access to them.
You can find PHP errors for nginx on linux in /var/log/nginx/error.log and /var/log/apache2/error.log for Apache, i'm not sure where they would be on a windows server.
[editline]0[/editline]
Forgot to mention, don't change the folder name 'steamauth' to anything else as this will break it
Sorry, you need to Log In to post a reply to this thread.