Se connecter avec
S'enregistrer | Connectez-vous

Compteur de téléchargements ?

Dernière réponse : dans Programmation
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>

<? } ?>

tu mets tes fichiers en .php et ensuite il faut que php soit installer sur le serveur ou tu mets tes pages...

<?
phpinfo();
?>

mets ca dans une page test.php et lance la par un navigateur. Si tu vois tout un blabla, c bon
Lassé par la pub ? Créez un compte