View difference between Paste ID: Et8dHfr1 and Me1uqHmt
SHOW: | | - or go back to the newest paste.
1
2
<?
3
    header('Access-Control-Allow-Origin: *');
4
	header('content-type: application/json; charset=utf-8');
5
6
	include_once '../model/RSSParser.class.php';
7
	include_once '../model/News.class.php';
8
	include_once '../util/util.class.php';
9
10
	$util = new Util();
11
12
	$folha_news = new News($_GET['rss_url']); 
13
	
14
	// echo $util->JSON_prettyPrint(json_encode($folha_news->array_news));
15
	
16
	/**
17
	 *  func is a Javascript function defined in default.js 
18
	 *
19
	 *		$_GET['element'] 	is the id of the element on the DOM ( will be filled with the news array ), 
20-
	echo "func(".json_encode($folha_news->array_news).",{$_GET['element']},{$_GET['qtd']})";
20+
21
	 *							to the javascript otherwise you pass it's ID
22
	 */
23
	echo "func('".json_encode($folha_news->array_news)."',{$_GET['element']},{$_GET['qtd']})";
24
?>