Téléchargement d'images HD avec Php

Bli55 Messages postés 9 Date d'inscription   Statut Membre Dernière intervention   -  
 hkr4ver -
Bonjour,

Pour mon site, je force le téléchargement d'images HD avec un script Php.

L'image est téléchargé seulement celle-ci est découpée en trois parties qui ne sont pas correctement positionnées.

Voici mon script :


<?php

$img = $_GET['path']."/".$_GET['dir']."/".$_GET['name'];
$name = $_GET['name'];

header('Content-Transfer-Encoding: none');
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Disposition: attachment; filename="'.$name.'"');
header('Content-Length: ' . filesize($img));
header('Expires: 0');

@readfile($img) OR die();

?>

Merci d'avance...
A voir également:

1 réponse

Bli55 Messages postés 9 Date d'inscription   Statut Membre Dernière intervention   13
 
Up
-3
hkr4ver
 
demain revien
0