Echo part of JSON

Status
Not open for further replies.

ButtLord420

Please delete my devbest account.
Dec 11, 2010
463
32
So I've done a successful curl, and received this response:
Code:
Array
(
[response] => Array
(
[result] => Array
(
[timeZero] => 1421452800000
[timeEnd] => 1421535600000
[count] => 1
[has_more] =>
[objs] => Array
(
[0] => Array
(
[cachedServerTime] => 1421647169000
[cachedExpryTime] => 1421647769000
[trafficBreakdown] => Array
(
[pageviews] => Array
(
[crawler] => 2
[regular] => 158
[threat] => 0
)

[uniques] => Array
(
[regular] => 21
[threat] => 0
[crawler] => 0
)

)

[bandwidthServed] => Array
(
[cloudflare] => 10008.617
[user] => 64897.412
)

[requestsServed] => Array
(
[cloudflare] => 379
[user] => 4295
)

[pro_zone] =>
[pageLoadTime] =>
[currentServerTime] => 1421647169000
[interval] => 40
[zoneCDate] => 1421308233000
[userSecuritySetting] =>
[dev_mode] => 0
[ipv46] => 3
[ob] => 1
[cache_lvl] => agg
[outboundLinks] => disabled
)

)

)

)

[result] => success
[msg] =>
)

How would I echo regular pageviews (Yes, it's cloudflare api) "[regular] => 21" in the pageviews array.
I've tried a few things but none seem to work, the variable for the JSON is $json
 
Status
Not open for further replies.

Users who are viewing this thread

Top