On Mon, 25 Nov 2002, marian wrote:
> 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.
>
Buhahahaa, si tu chiar crezi ca daca vor sa te pacaleasca nu sa sa seteze
ei referer cum verifici tu ?!
Deci exista programe specializate de download distribuit de pe zeci de
site-uri free de web-hosting, care iti seteaza referer cum trebuie, ba mai
mult au lista cu distributia fisierelelor (plus mirror-uri in caz de
picari) plus ca fisierele sunt de fapt niste jpg-uri perfect valide doar
ca dupa imaginea de 10x10 au continutul real, pe care programul il
despacheteaza and stuff...
Deci fie ca lasi ca cei fara referer sa poata lua fie ca lasi doar cei cu
referer site-ul tau, dpdpv al securitatii (sau cum vrei sa zici) cele 2
optiuni sunt egale. Atunci cand vor da de site-ul tau vor face programele
sa downloadeze de la tine la greu.
> 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");
> }
> ?>
>
>
>
>
----------------------------
Mihai RUSU
Disclaimer: Any views or opinions presented within this e-mail are solely
those of the author and do not necessarily represent those of any company,
unless otherwise specifically stated.
---
Pentru dezabonare, trimiteti mail la
[EMAIL PROTECTED] cu subiectul 'unsubscribe rlug'.
REGULI, arhive si alte informatii: http://www.lug.ro/mlist/