<?php
//This is example of qquploader files handler - it will handle upload and return results to qquploader.
include_once('glowFoto.class.php');
$glowFoto = new GlowFotoAPI();
$glowFoto->setThumbSize(GlowFotoAPI::THUMB_SIZE_100);
if (isset($_GET['qqfile'])) {
$URLs=$glowFoto->fastSendFromPOSTOrFileContent(file_get_contents('php://input'));
} elseif (isset($_FILES['qqfile'])) {
$URLs=$glowFoto->fastSendFromFile($_FILES['qqfile']['tmp_name']);
unlink($_FILES['qqfile']['tmp_name']);
} else die('error');
$ar = array('success'=>true, 'thumbUrl'=>(string)$URLs['thumb'], 'imgUrl'=>(string)$URLs['img']);
echo htmlspecialchars(json_encode($ar), ENT_NOQUOTES);
?>
|