<?php
include '../env.php';
require_once(LIB.'common.inc.php');
require_once(LIB.'Post.class.php');
header('Access-Control-Allow-Origin: *');
$post = new Post();
$recents = $post->getRecentUrlUrls();
echo json_encode($post->getHotUrl(@$_GET['limit']=='none' ? NULL : 3, $recents));
?>