* @license GNU General Public License http://www.gnu.org/licenses/gpl.html * @link http://rudloff.pro * */ require_once 'common.php'; require_once 'download.php'; if (isset($_GET["url"])) { header('Content-Type: application/json'); try { $video = VideoDownload::getJSON($_GET["url"]); echo json_encode($video); } catch (Exception $e) { echo json_encode(array('success'=>false, 'error'=>$e->getMessage())); } }