본문 바로가기
웹 관련 기록/PHP

STEAM WEB API - 회원가입 시간 값, 로그아웃 시간 값

by Planetis 2013. 12. 18.

JSON으로 데이터를 받아오면

timecreated -> 여기에 회원가입 날자가 유닉스타임으로 저장되어 있음. (ex 1360062267)

lastlogoff -> 로그아웃 시간.

 

유닉스타임으로 되어 있기 때문에 해당값을

php에서 date('c', 시간) 처리를 해주면 

2013-02-05T20:04:27+09:00 이런식으로 리턴 됨.


JSON 샘플

{

    "response": {

        "players": [

            {

                "steamid": "유저식별번호(id)",

                "communityvisibilitystate": 0,

                "profilestate": 0,

                "personaname": "유저닉네임",

                "lastlogoff": 0,

                "profileurl": "http://steamcommunity.com/id/<nickname>/",

                "avatar": "http://media.steampowered.com/steamcommunity/public/images/avatars/08/0.jpg",

                "avatarmedium": "http://media.steampowered.com/steamcommunity/public/images/avatars/08/0_medium.jpg",

                "avatarfull": "http://media.steampowered.com/steamcommunity/public/images/avatars/08/0_full.jpg",

                "personastate": 0,

                "primaryclanid": "0",

                "timecreated": 0,

                "loccountrycode": "KR",

                "locstatecode": "0"

            }

        ]

 

    }

}

320x100

댓글