well there is nothing wrong with the string, i got an api and tested it and it returns info. from what I can see you don’t actually include the dota-wrapper class in your page. you also don’t have your database defined as it says to.
i would suggest working directly with the steam api rather than this wrapper, at least until you have a better understanding of what you are doing.
try working with the code below to see if any of it makes sense to you:
[php]$matchID = “51730xyz”;
$key = “xxxxx”;
$baseUrl = ‘https://api.steampowered.com/IDOTA2Match_570/’;
/* Get Match Details */
$url[0] = $baseUrl.‘GetMatchDetails/V001/?key=’.$key.’&match_id=’.$matchID;
/* Get 25 latest matches from AM */
$url[1] = $baseUrl.‘GetMatchHistory/V001/?format=JSON&language=en_us&key=’.$key.’&hero_id=1’;
/* Get list of up2date heroes */
$url[2] = ‘http://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/?key=’. $key. ‘&language=en_us&format=JSON’;
$res = file_get_contents($url[2]);
$json_output = json_decode ( $res, true );
foreach ($json_output[‘result’] as $heroes) {
foreach ($heroes as $k => $hero) {
echo ‘Hero #’. $k. ‘
’;
echo $hero[‘localized_name’]. ’ = '. $hero[‘name’]. ‘
’;
}
echo ‘
’;
}
var_dump($json_output);[/php]