Skip to content

Instantly share code, notes, and snippets.

@kicktv
kicktv / fm.php
Last active March 15, 2024 17:52
File Manager PHP (single file)
<?php
/**
* source =>https://gist.github.com/jhedev96/f6aaf58fd7d937bfaa34fd31e2baf23f
* File Manager Script
*/
// Default language ('en' and other from 'filemanager-l10n.php')
$lang = 'en';
// Auth with login/password (set true/false to enable/disable it)
@kicktv
kicktv / force-download-remote-file.php
Last active October 23, 2022 15:23
php force download remote file
<?php
//php force download remote file
// Remote download URL
$remoteURL = 'http://www.html-editor.tk/videos/sintel.mp4';
// Force download
header('Content-type: application/octet-stream');
header("Content-Disposition: attachment; filename=".basename($remoteURL));
ob_end_clean();
@kicktv
kicktv / get-remote-filesize.php
Last active May 25, 2020 00:09
php get remote file size
<?php
//php get remote file size
$url = "http://www.html-editor.tk/videos/sintel.mp4";
$head = array_change_key_case(get_headers($url, TRUE));
$size = $head['content-length'];
echo $size;
?>