<?php

#sleep(2);

$feed = new sspmod_discojuice_Feed();

if (!empty($_REQUEST['refresh'])) {
	$feed->store();
	$data = $feed->read();	
} else {
	$data = $feed->read();	
}






if (!empty($_REQUEST['debug'])) {
	

	header('Content-Type: text/plain; charset=utf-8');
	print_r(json_decode($data, 'utf-8'));
	exit;
}

header('Content-Type: application/json; charset=utf-8');
	
if(isset($_REQUEST['callback'])) {
	echo $_REQUEST['callback'] . '(' . $data . ');';
} else {
	echo $data;
}








<?php


#sleep(2);

$feed = new sspmod_discojuice_Feed();

if (!empty($_REQUEST['refresh'])) {
	$feed->store();
	$data = $feed->read();	
} else {
	$data = $feed->read();	
}




if (!empty($_REQUEST['debug'])) {

	header('Content-Type: text/plain; charset=utf-8');
	print_r($data);
	
}

header('Content-Type: application/json; charset=utf-8');
	

if(isset($_REQUEST['callback'])) {
	echo $_REQUEST['callback'] . '(' . $data . ');';
} else {
	echo $data;
}








--- 
+++ 
@@ -1,5 +1,4 @@
 <?php
-
 
 #sleep(2);
 
@@ -15,16 +14,18 @@
 
 
 
+
+
 if (!empty($_REQUEST['debug'])) {
+	
 
 	header('Content-Type: text/plain; charset=utf-8');
-	print_r($data);
-	
+	print_r(json_decode($data, 'utf-8'));
+	exit;
 }
 
 header('Content-Type: application/json; charset=utf-8');
 	
-
 if(isset($_REQUEST['callback'])) {
 	echo $_REQUEST['callback'] . '(' . $data . ');';
 } else {
Improve DiscoJuice Feed debug view