NU e buna solutia :((
Daca link-ul meu e de tip download.php?fisier=lulu.avi, cineva ar putea pune
link-ul alsta pe o alta pagina cu mentiunea, right click+save as.
Nu sunt sigur, dar nici Save as nu parseaza referal.

Sample COD:
<?
$path="cale cartre fis outside root apache";
$p=$path.$t;
$refer=getenv("HTTP_REFERER");
if (strcmp($refer, "REFERAL BUN"){
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                          // HTTP/1.0
header ("Content-Type: video/x-ms-wmv");
/* Content-Length is not necessary, but if you supply it, the user will see
how
 * big the file is, and, presumably, how far they are into the download */
$contentlength=filesize($p);
header ("Content-Length: " . $contentlength);
$fisname=basename($p);
//echo $fisname;
header ("Content-Disposition: inline; filename=".$fisname);
//$p=addslashes($p);
//echo $p;
$fis=fopen($p,"r");
fpassthru($fis);
}
else {
//echo $refer;
header ("Location: http://www.disney.com";);
}
?>




> Pai daca mplayer nu trimite nimic, atunci da-i voie filmului si pentru
> $HTTP_REFERER = ''.
> Cind vin cereri cu alt re3ferrer decit site-ul tau, ii dai deny. Cind sint
> de pe siteul tau, sau
> empty, le accepti.




---
Pentru dezabonare, trimiteti mail la 
[EMAIL PROTECTED] cu subiectul 'unsubscribe rlug'.
REGULI, arhive si alte informatii: http://www.lug.ro/mlist/


Raspunde prin e-mail lui