From 9f0bd1c5bb99a83c80a7b7ec97e17049764f334b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 20 Jun 2018 21:40:55 +0200 Subject: More analyzing and rendering of the data --- assets/php/getJson.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 assets/php/getJson.php (limited to 'assets/php') diff --git a/assets/php/getJson.php b/assets/php/getJson.php old mode 100644 new mode 100755 index b72070a..fbbecac --- 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); -- cgit v1.2.3