mam sobie taki skrypt
Kod
<?php
if ( $_SERVER[ 'HTTP_REFERER' ] == "http://poprawny.url.pl" )
{
$file = './xxxxxxxxxxxxxxxxxxx.avi'.basename($fname);
$lol = "ladna nazwa.avi";
header("Cache-control: private");
header("Content-Type: application/octet-stream");
header("Content-Length: ".filesize($file));
header("Content-Disposition: attachment; filename=".basename($lol));
header("Connection: Close");
readfile($file);
}
else
{ echo '
<html><head><META HTTP-EQUIV="content-type" CONTENT="text/html;
charset=iso-8859-2">
<META http-equiv=content-language content=pl></head><body>
Niestety, poziom zabezpieczeń twojej zapory internetowej skutecznie
uniemozliwia pobranie tego pliku,<br> należy obnizyc poziom
bezpieczenstwa, b±dz całkowicie wył±czyć FireWalla na czas pobierania
<br> Za utrudnienia przepraszamy.</body></html>';
}
?>
if ( $_SERVER[ 'HTTP_REFERER' ] == "http://poprawny.url.pl" )
{
$file = './xxxxxxxxxxxxxxxxxxx.avi'.basename($fname);
$lol = "ladna nazwa.avi";
header("Cache-control: private");
header("Content-Type: application/octet-stream");
header("Content-Length: ".filesize($file));
header("Content-Disposition: attachment; filename=".basename($lol));
header("Connection: Close");
readfile($file);
}
else
{ echo '
<html><head><META HTTP-EQUIV="content-type" CONTENT="text/html;
charset=iso-8859-2">
<META http-equiv=content-language content=pl></head><body>
Niestety, poziom zabezpieczeń twojej zapory internetowej skutecznie
uniemozliwia pobranie tego pliku,<br> należy obnizyc poziom
bezpieczenstwa, b±dz całkowicie wył±czyć FireWalla na czas pobierania
<br> Za utrudnienia przepraszamy.</body></html>';
}
?>
Wszystko piekinie dziala z jednym ale... kiedy podczas pobierania wylacze przegladarke, skrypt sie nie zatrzymuje ciagle liczy zajmujac procka dysk i wszystko inne, jak temu zaradzic?
gdyby to bylo na hostingu czyims to nawet bym sie nie przejal
