<?php
/*
File: mkfiles2dnl v0.1 - 26/04/2020
Role: To make your files2dnl.txt
Usage:
- in xterm: php mkfiles2dnl.php > files2dnl.txt
- by web : Display the script then File/Save as...
Default action (field 3) :
- 0 : none (0 or "").
- 1 : file
- 2 : mail
- 3 : file + mail
- 4 : database
- 5 : file + database
- 6 : mail + database
- 7 : file + mail + database
NB: In any case, files on your web server will be
logged into your http server logfiles.
*/
$begin = 0; // start from
$end = 25; // included
$default = ""; // "" or 0, 1, 2, 3, 4, 5, 6, 7.
// ========== DON'T MODIFY BELOW ==========
// Executed in a terminal or by the web ?
$web = $_SERVER["DOCUMENT_ROOT"];
if($web) {
header("Content-disposition: filename=files2dnl.txt");
header("Content-type: text/plain");
}
echo "num;md5(num);action;subject;file|url\n";
for($n=$begin; $n<=$end; $n++) {
echo $n.";".md5($n).";$default;;\n";
}
?>
|