Skip to content

Instantly share code, notes, and snippets.

View CDRO's full-sized avatar
😀

Tizian Schmidlin CDRO

😀
View GitHub Profile
@CDRO
CDRO / download.phpt
Created October 4, 2018 11:07
A safe single download for files in PHP
<?php
if(file_exists(__FILE__ . '.downloaded')) {
header('Location:/');
die;
}
touch(__FILE__ . '.downloaded');
$file = '__REPLACE_ME_FILE_PATH__';

Keybase proof

I hereby claim:

  • I am CDRO on github.
  • I am tschmidlincab (https://keybase.io/tschmidlincab) on keybase.
  • I have a public key whose fingerprint is 6697 0C1D 2F43 A3EE D4AE 6947 29BE D76B 115A F72F

To claim this, I am signing this object: