Raised This Month: $ Target: $400
 0% 

[PHP] Steam Functions / ID finder


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 10-12-2013 , 14:40   [PHP] Steam Functions / ID finder
Reply With Quote #1

Steam Functions for the VALVe Web API.

This is an assortment of classes and methods written in PHP.

SteamIDCheck:

-The SteamIDCheck method in the SteamIDConvert class will accept any variation of a Steam ID or Community link and return an array with the STEAM:0:0:123456 (key 'steam_id', Steam ID 64 format (key 'steamID64', and a link to their community page(key 'steam_link').

-There is also an assortment of functions for conversion within the SteamIDConvert class used to support the SteamIDCheck method.

SteamQuery:

-The methods inside the SteamQuery class will send an API request to VALVe's server and return decoded JSON for use in your PHP script. It will also cache the information retrieved from VALVe's servers to speed up load times, and reduce queries. The cached files will refresh every 15 minutes by default, but you can adjust the cache time with the 'cache_time' variable.

-ConvertVanityURL will return the 64 bit Steam ID for the player


Everything you need is in the class_lib.php file, you will also need an API key from valve. The index.php is just sample content to show what you can do with the library provided. It is in no way needed to use these functions.



Sample page:
http://nineteeneleven.info/steamfunctions/

Download:
http://nineteeneleven.info/downloads...?loc=./WebApps

GitHub:
https://github.com/nineteeneleven/SteamFunctions
__________________

Last edited by nineteeneleven; 10-12-2013 at 14:40.
nineteeneleven is offline
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 10-12-2013 , 17:15   Re: [PHP] Steam Functions / ID finder
Reply With Quote #2

Thank you, this is very useful indeed.
Snaggle is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 10-12-2013 , 20:40   Re: [PHP] Steam Functions / ID finder
Reply With Quote #3

Api key for this? Dafuq
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 10-12-2013 , 23:28   Re: Re: [PHP] Steam Functions / ID finder
Reply With Quote #4

Quote:
Originally Posted by Zephyrus View Post
Api key for this? Dafuq
Few reasons for an API key.

An API key is REQUIRED by valve for 90% of the functionality within this library

I don't know how frequently a person using this library will be querying the valve servers, and I don't want them to get hit with the great valve firewall.

I'm using json not xml

If you don't already have an API key you probably shouldn't be using this anyway.
__________________

Last edited by nineteeneleven; 10-12-2013 at 23:30.
nineteeneleven is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode