require_session(); $request = http_request::getInstance(); $parm = $request->get_parms('token'); $token = (string) ($parm["token"]); try { $datas = ((random::helloToken($app, $token))); } catch (Exception_NotFound $e) { die('0'); } if ( ! is_string($datas['datas'])) die('0'); if (($list = @unserialize($datas['datas'])) == false) { die('0'); } set_time_limit(0); session_write_close(); ignore_user_abort(true); $registry = $app['phraseanet.registry']; $zipFile = $registry->get('GV_RootPath') . 'tmp/download/' . $datas['value'] . '.zip'; set_export::build_zip(new Filesystem(), $token, $list, $zipFile); echo '1';