Beispiel #1
0
    /* Read file. */
    header('Content-Length: ' . $link['file_size']);
    header('Content-Type: ' . $link['mime_type']);
    header('Content-Disposition: attachment; filename="' . $link['file_name'] . '"');
    $r = fopen(VAR_FILES . $p . $link['md5'], 'r');
    while (!feof($r)) {
        print fread($r, 1024);
        ob_flush();
    }
    fclose($r);
    if ($link['onetime'] == 'O') {
        Pingouin_delete_link($link_name);
    }
    exit;
} elseif (isset($_GET['get_capacity'])) {
    echo min(Pingouin_ini_to_bytes(ini_get('post_max_size')), Pingouin_ini_to_bytes(ini_get('upload_max_filesize')));
} elseif (isset($_GET['get_maximal_upload_size'])) {
    echo $cfg['maximal_upload_size'];
} elseif (isset($_GET['get_version'])) {
    echo Pingouin_VERSION;
} elseif (isset($_GET['lang'])) {
    $l = $_GET['lang'];
    if ($l == "bash") {
        ?>
#!/bin/bash

# This script has been auto-generated by Pingouin but you can still edit 
# options below.

# Config
proxy='' # ex: proxy='proxysever.test.com:3128' or set Pingouin_PROXY global variable
Beispiel #2
0
/**
 * gets the maximum upload size according to php.ini
 * @returns the maximum upload size string
 */
function Pingouin_get_max_upload_size()
{
    return Pingouin_human_size(min(Pingouin_ini_to_bytes(ini_get('post_max_size')), Pingouin_ini_to_bytes(ini_get('upload_max_filesize'))));
}