<?php
$amg = '{
"friendslist": {
"friends": [
{
"steamid": "76561197960265731",
"relationship": "friend",
"friend_since": 0
},
{
"steamid": "76561197960265738",
"relationship": "friend",
"friend_since": 0
},
{
"steamid": "76561197960265740",
"relationship": "friend",
"friend_since": 0
},
{
"steamid": "76561197960265747",
"relationship": "friend",
"friend_since": 0
}
]
}
}';
foreach ( $decode->friendslist->friends as $valor){
echo 'Id:'.$valor->steamid.PHP_EOL;
echo 'Rel.:'.$valor->relationship.PHP_EOL;
echo PHP_EOL;
}
PD9waHAKCiAkYW1nID0gJ3sKCSAgICAiZnJpZW5kc2xpc3QiOiB7CgkgICAgICAgICJmcmllbmRzIjogWwoJICAgICAgICAgICAgewoJICAgICAgICAgICAgICAgICJzdGVhbWlkIjogIjc2NTYxMTk3OTYwMjY1NzMxIiwKCSAgICAgICAgICAgICAgICAicmVsYXRpb25zaGlwIjogImZyaWVuZCIsCgkgICAgICAgICAgICAgICAgImZyaWVuZF9zaW5jZSI6IDAKCSAgICAgICAgICAgIH0sCgkgICAgICAgICAgICB7CgkgICAgICAgICAgICAgICAgInN0ZWFtaWQiOiAiNzY1NjExOTc5NjAyNjU3MzgiLAoJICAgICAgICAgICAgICAgICJyZWxhdGlvbnNoaXAiOiAiZnJpZW5kIiwKCSAgICAgICAgICAgICAgICAiZnJpZW5kX3NpbmNlIjogMAoJICAgICAgICAgICAgfSwKCSAgICAgICAgICAgIHsKCSAgICAgICAgICAgICAgICAic3RlYW1pZCI6ICI3NjU2MTE5Nzk2MDI2NTc0MCIsCgkgICAgICAgICAgICAgICAgInJlbGF0aW9uc2hpcCI6ICJmcmllbmQiLAoJICAgICAgICAgICAgICAgICJmcmllbmRfc2luY2UiOiAwCgkgICAgICAgICAgICB9LAoJICAgICAgICAgICAgewoJICAgICAgICAgICAgICAgICJzdGVhbWlkIjogIjc2NTYxMTk3OTYwMjY1NzQ3IiwKCSAgICAgICAgICAgICAgICAicmVsYXRpb25zaGlwIjogImZyaWVuZCIsCgkgICAgICAgICAgICAgICAgImZyaWVuZF9zaW5jZSI6IDAKCSAgICAgICAgICAgIH0KCSAgICAgICAgXQoJICAgIH0KCX0nOwoJCgkkZGVjb2RlID0ganNvbl9kZWNvZGUoICRhbWcsIEZBTFNFICk7Cglmb3JlYWNoICggJGRlY29kZS0+ZnJpZW5kc2xpc3QtPmZyaWVuZHMgYXMgJHZhbG9yKXsKCQllY2hvICdJZDonLiR2YWxvci0+c3RlYW1pZC5QSFBfRU9MOwoJCWVjaG8gJ1JlbC46Jy4kdmFsb3ItPnJlbGF0aW9uc2hpcC5QSFBfRU9MOwoJCWVjaG8gUEhQX0VPTDsKCX0=