Created
February 26, 2013 14:29
-
-
Save Bueloha/5038809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* TASK 2 ARTICLE CLUSTERING */ | |
<?php | |
session_start(); | |
$_SESSION['title']='$title'; | |
?> | |
<?php | |
include('lib/connect.php'); | |
$sql = "SELECT * FROM eliseo_exam_table where title like $_SESSION['title'] LIMIT 10"; | |
$result = mysql_query($sql); | |
while($row = mysql_fetch_array($result)) | |
{ | |
$rows[] = array( | |
"publish" => $row['publish'], | |
"content" => $row['content'], | |
"source_url" => $row['source_url'], | |
"author" => $row['author'], | |
"title" => $row['title']); | |
} | |
$json = json_encode($rows); | |
$callback = $_GET['callback']; | |
echo $callback.'('. $json . ')'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment