Create a file with the name, say, of the download.phpfollowing contents:
<?php
$Down=$_GET['Down'];
?>
<html>
<head>
<meta http-equiv="refresh" content="0;url=<?php echo $Down; ?>">
</head>
<body>
<?php
$filePath = $Down.".txt";
$count = file_exists($filePath) ? file_get_contents($filePath) : 0;
file_put_contents($filePath, ++$count);
echo "Downloads:" . $count;
?>
</body>
</html>
Put a link to it on another page, the file will be downloaded as a parameter:
download.php?Down=download.zip
Answer the link Dreamincode answer to a similar question
source
share