Welcome Guest, Not a member yet? Register   Sign In
Steam API Library?
#1

[eluser]ShoeLace1291[/eluser]
I've created a library for the Steam API to integrate my website with their community. What it can do is get profile information based on a provided steam id(ie STEAM_0:1:9338691). Accessible information from my library includes profile name, friends, and online status. The Steam API has access to more information, but I'm only going to implement this if you guys think this library would be useful.

Usage example:
Code:
<?php

class Home extends Controller {

    function Home(){
        parent::Controller();
    }
    
    function index(){
    
        $this->load->library('steam');
        $config['steamid'] = 'STEAM_0:1:9338691';
        $this->steam->initialize($config);

            echo $this->steam->profileName()." is currently ".$this->steam->status()."<br>Friends Online: <br>".$this->steam->friends();
        
        
    }
    
}

Let me know if something like this would be of use to you guys. I use it for my Counter-Strike clan's website and use their steam profile names as display names for my site so other members know who they are. I'm not sure how many people code their Steam clans' websites in CodeIgniter, but I thought it would be an interesting library for me to make.
#2

[eluser]richthegeek[/eluser]
Please take the CI coding conventions into account if you want to release it publicly. Chiefly, camelCase vs Under_score:
http://ellislab.com/codeigniter/user-gui...hod_naming
#3

[eluser]Unknown[/eluser]
I am writing something similar to a steam api. I know this post is almost a year late but searching google for steam api, this was the first thing to pop up. Anyway, I am using simplehtmldom (http://simplehtmldom.sourceforge.net/) to pull information from the users profile and store it into a mysql database. Just view the source html from the steam profile and get all the div ids that you want to pull. You will need to users profile id or custom link though, and if steam were to ever change the site, you would have to go back and change your script.
#4

[eluser]Dennis Rasmussen[/eluser]
[quote author="Naters" date="1286885222"]I am writing something similar to a steam api. I know this post is almost a year late but searching google for steam api, this was the first thing to pop up. Anyway, I am using simplehtmldom (http://simplehtmldom.sourceforge.net/) to pull information from the users profile and store it into a mysql database. Just view the source html from the steam profile and get all the div ids that you want to pull. You will need to users profile id or custom link though, and if steam were to ever change the site, you would have to go back and change your script.[/quote]

Ehh what?
http://forums.steampowered.com/forums/sh...ostcount=9




Theme © iAndrew 2016 - Forum software by © MyBB