Estoy comenzando a trabajar con el API de Steam: http://steamcommunity.com/dev/
He visto el siguiente ejemplo de LOGIN:
Código PHP:
Ver original
<?php require 'includes/lightopenid/openid.php'; $_STEAMAPI = "YOURSTEAMAPIKEY"; try { $openid = new LightOpenID('http://URL.TO.REDIRECT.TO.AFTER.LOGIN/'); if(!$openid->mode) { { $openid->identity = 'http://steamcommunity.com/openid/?l=english'; // This is forcing english because it has a weird habit of selecting a random language otherwise } ?> <form action="?login" method="post"> <input type="image" src="http://cdn.steamcommunity.com/public/images/signinthroughsteam/sits_small.png"> </form> <?php } elseif($openid->mode == 'cancel') { echo 'User has canceled authentication!'; } else { if($openid->validate()) { $id = $openid->identity; // identity is something like: http://steamcommunity.com/openid/id/76561197960435530 // we only care about the unique account ID at the end of the URL. $ptn = "/^http:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/"; echo "User is logged in (steamID: $matches[1])\n"; $url = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=$_STEAMAPI&steamids=$matches[1]"; foreach ($json_decoded->response->players as $player) { echo " <br/>Player ID: $player->steamid <br/>Player Name: $player->personaname <br/>Profile URL: $player->profileurl <br/>SmallAvatar: <img src='$player->avatar'/> <br/>MediumAvatar: <img src='$player->avatarmedium'/> <br/>LargeAvatar: <img src='$player->avatarfull'/> "; } } else { echo "User is not logged in.\n"; } } } catch(ErrorException $e) { echo $e->getMessage(); } ?>
Mi primer problema es que no tengo esta referencia:
Código PHP:
require 'includes/lightopenid/openid.php';
Supongo que lo debo tener delante de mis narices... pero no lo veo!!
Muchas gracias por su ayuda.
Salu2