-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtests.php
72 lines (66 loc) · 1.37 KB
/
tests.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$configs = include('configs.php');
$json = '
{
"meta": {
"code": 201
},
"data": {
"created_at": "2016-12-22T14:49:16Z",
"guid": "43414D15-AF76-448E-8FB0-B8CABBB325A9",
"id": "2392",
"source": {
"id": "3PFPMSet53RutGINA8e5HWqYg_UCDHad",
"link": "http://xyz.s3rv.com",
"name": "Broadsword"
},
"thread_id": "2392",
"counts": {
"bookmarks": 0,
"reposts": 0,
"replies": 0,
"threads": 0
},
"content": {
"html": "<span itemscope=\"https://pnut.io/schemas/Post\"><span data-tag-name=\"system\" itemprop=\"tag\">#system</span> of a duck</span>",
"text": "#system of a duck",
"entities": {
"links": [],
"mentions": [],
"tags": [
{
"len": 7,
"pos": 0,
"text": "system"
}
]
}
},
"you_bookmarked": false,
"you_reposted": false
}
}
';
$arrayName = json_decode($json, true);
//echo $arrayName['meta']['server'];
var_dump($arrayName['data']['id']);
//echo $link. "\n";
// 'userName'
// 'siteUrl'
// 'siteTitle'
// 'siteDescription'
// 'password'
// 'twitterName'
// 'twAPIkey'
// 'twAPIsecret'
// 'twUserKey'
// 'twUserSecret'
// 'timezone'
// 'knownSite'
// 'knownUser'
// 'knownAPIkey'
// 'knownTwName'
// 'tenCauthtoken'
?>