HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
Echo.php
Go to the documentation of this file.
1 <?php
2 $json = '{
3  "errorCode": 0,
4  "errorMessage": "",
5  "itemsList": [
6  {
7  "errorCode": 0,
8  "errorMessage": "",
9  "host": "localhost",
10  "id": 230287420,
11  "itemObject": [
12  {
13  "avgSpeed": 0,
14  "avgSpeedCounter": 0,
15  "cDate": {
16  "str": "2014-10-22 17:30:34"
17  },
18  "collectedURLs": 1,
19  "contents": 0,
20  "description": "",
21  "errorMask": 524288,
22  "errors": 1,
23  "fetchType": 1,
24  "filters": [
25  {
26  "mode": 0,
27  "pattern": "^(?:http(?:s)?://)?(?:[^.]+.)?cnn.co.jp/photo/(.*)",
28  "siteId": "333abec8c863dd0ca69963fb0ab8b97e",
29  "type": 0
30  },
31  {
32  "mode": 0,
33  "pattern": "^(?:http(?:s)?://)?(?:[^.]+.)?cnn.co.jp/(.*)",
34  "siteId": "333abec8c863dd0ca69963fb0ab8b97e",
35  "type": 1
36  }
37  ],
38  "httpTimeout": 30000,
39  "id": "333abec8c863dd0ca69963fb0ab8b97e",
40  "iterations": 0,
41  "maxErrors": 100000,
42  "maxResourceSize": 1000000,
43  "maxResources": 200,
44  "maxURLs": 200,
45  "maxURLsFromPage": 200,
46  "priority": 0,
47  "processingDelay": 500,
48  "properties": {
49  "AUTO_REMOVE_ORDER": "ContentType ASC, CDate ASC",
50  "AUTO_REMOVE_RESOURCES": "1",
51  "AUTO_REMOVE_WHERE": "ParentMd5<>\"\" AND Status IN (4,7) AND DATE_ADD(UDate, INTERVAL %RecrawlPeriod% MINUTE)<NOW()",
52  "HTTP_COOKIE": "",
53  "HTTP_HEADERS": "",
54  "PROCESS_CTYPES": "text/html",
55  "STORE_HTTP_HEADERS": "1",
56  "STORE_HTTP_REQUEST": "1",
57  "template": "{\"description\":[\"//div[@id=\\\"leaf-body\\\"]\"],\"pubdate\":[\"//div[@id=\\\"leaf_header\\\"]/div[@class=\\\"row\\\"]/p/text()\"],\"media\":[\"//div[@id=\\\"leaf_large_image\\\"]//img | //div[@id=\\\"leaf-media\\\"]/div[@class=\\\"img-caption\\\"]//img[not(@no-padding)]\"],\"title\":[\"//div[@id=\\\"leaf_header\\\"]/div[@class=\\\"row\\\"]/h1/text()\"]}"
58  },
59  "recrawlDate": {
60  "str": "2014-10-22 21:30:34"
61  },
62  "recrawlPeriod": 240,
63  "requestDelay": 500,
64  "resources": 1,
65  "size": 0,
66  "state": 1,
67  "tcDate": {
68  "str": "2014-10-22 17:30:47"
69  },
70  "uDate": {
71  "str": "None"
72  },
73  "urlType": 0,
74  "urls": [
75  "http://www.cnn.co.jp/"
76  ],
77  "userId": 2
78  }
79  ],
80  "node": "m011_data",
81  "port": "5530",
82  "time": 123
83  }
84  ]
85 }';
86 Yii::import('');
87 var_dump(CJSON::decode($json));