diff options
author | Marvin Borner | 2018-06-20 21:40:55 +0200 |
---|---|---|
committer | Marvin Borner | 2018-06-20 21:40:55 +0200 |
commit | 9f0bd1c5bb99a83c80a7b7ec97e17049764f334b (patch) | |
tree | 754dfe7e09f2b5eb179d6da79d4c59ca0f870508 /assets/php | |
parent | 00bcaead3b61ab4f637c562a63e11e91d3b7852e (diff) |
More analyzing and rendering of the data
Diffstat (limited to 'assets/php')
-rwxr-xr-x[-rw-r--r--] | assets/php/getJson.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/assets/php/getJson.php b/assets/php/getJson.php index b72070a..fbbecac 100644..100755 --- a/assets/php/getJson.php +++ b/assets/php/getJson.php @@ -11,13 +11,14 @@ while ($LastPage === FALSE) { curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_COOKIE, $NetflixCookie); $Result = curl_exec($ch); - //echo $Result; + //print_r((json_decode($Result, TRUE)["viewedItems"])); //echo count(json_decode(curl_exec($ch),true)["viewedItems"]); - if ($LastPage = count(json_decode($Result, TRUE)["viewedItems"][0]) > 0) { + if ($LastPage = count(json_decode($Result, TRUE)["viewedItems"]) > 0) { $LastPage = FALSE; - $NetflixJson .= json_encode(json_decode($Result, TRUE)["viewedItems"][0]) . ","; + $NetflixJson .= json_encode(json_decode($Result, TRUE)["viewedItems"]) . ","; } else { $LastPage = TRUE; + $NetflixJson = substr($NetflixJson, 0, -1); } curl_close($ch); |