duanjian4698 2019-04-21 23:46
浏览 68

STEAM WEB API:只有一个蒸汽ID工作,否则不起作用V.2

I'm really new to php and doesnt understand much with apis.. I wrote this code:

<?php
$steamkey = "xxxxx"; // censored In real code I have the right steamkey
$id_user = "76561198047217104";// only this steam id works

$apifr = "http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730&key=".$steamkey."&steamid=".$id_user;

$data = file_get_contents($apifr); // put the contents of the file into a variable

$test = json_decode($data);

echo print_r($test->playerstats->stats[0]->value, true);
?>

the result is the total_kills of the player steam id:

49999

The result "49999" are the right total_kills of the player in csgo, which actually works just fine, but if I try different steamids it doesnt work anymore...

Could someone please help me and explain why or give another solution to use the steam api for csgo player stats?

Thank you all

I tried more then 10 different right steam ids, however they doesnt work... Some people have names instead of for example "1231943812" as a steam id, it doesnt work too, I dont know how to use the names too

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算