Compteur de téléchargements ?
Dernière réponse : dans Programmation
Bonjour à tous.
J'ai quelques notions en HTML/Javascript mais je sais pas comment faire un compteur de téléchargement ; quelqu'un pourrait-il m'aider ?
Merci.
J'ai quelques notions en HTML/Javascript mais je sais pas comment faire un compteur de téléchargement ; quelqu'un pourrait-il m'aider ?
Merci.
Autres pages sur : compteur telechargements
Lassé par la pub ? Créez un compte
un code que j'ai pour download un truc
<?
if($_GET["dwn"]) {
// ob_clean(); // Vide le buffer (v >= 4.2)
// Dialogue de téléchargement
header("content-type: application/octet-stream");
// seulement pour application/octet-stream !
header("Content-Disposition: attachment; filename=".$_GET["dwn"]);
// Ouvrir avec MSWord
// header("content-type: application/msword");
// Ouvrir avec MSExcel
// header("content-type: application/vnd.ms-excel");
// Ouvrir en Text
// header("content-type: text/plain");
// voir aussi http://dev.nexen.net/scripts/details.php?scripts=354
flush(); // Envoie le buffer
readfile($_GET["dwn"]); // Envoie le fichier
} else { ?>
<A href="download.php?dwn=download.php">Test</A>
<? } ?>
<?
if($_GET["dwn"]) {
// ob_clean(); // Vide le buffer (v >= 4.2)
// Dialogue de téléchargement
header("content-type: application/octet-stream");
// seulement pour application/octet-stream !
header("Content-Disposition: attachment; filename=".$_GET["dwn"]);
// Ouvrir avec MSWord
// header("content-type: application/msword");
// Ouvrir avec MSExcel
// header("content-type: application/vnd.ms-excel");
// Ouvrir en Text
// header("content-type: text/plain");
// voir aussi http://dev.nexen.net/scripts/details.php?scripts=354
flush(); // Envoie le buffer
readfile($_GET["dwn"]); // Envoie le fichier
} else { ?>
<A href="download.php?dwn=download.php">Test</A>
<? } ?>
Lassé par la pub ? Créez un compte