Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "kind": "youtube#channelListResponse",
- "etag": ""IHLB7Mi__JPvvG2zLQWAg8l36UU/cElfTza4UGHG8g6mYtCKSIOXxq0"",
- "pageInfo": {
- "totalResults": 1,
- "resultsPerPage": 5
- },
- "items": [
- {
- "kind": "youtube#channel",
- "etag": ""IHLB7Mi__JPvvG2zLQWAg8l36UU/EGw-f95GMJ7EnCAhVPMzL1JSykQ"",
- "id": "UCxAICW_LdkfFYwTqTHHE0vg",
- "statistics": {
- "viewCount": "107418936",
- "commentCount": "295",
- "subscriberCount": "428265",
- "hiddenSubscriberCount": false,
- "videoCount": "2270"
- }
- }
- ]
- }
- function test() {
- $url = "https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername=youtube&key={key}";
- $json = file_get_contents($url);
- $json_data = json_decode($json, true);
- echo $json_data["kind"];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement