10-17-2008, 05:28 PM
|
#1 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
hiding original link problem
hey i use this code to let visitors download files and hiding the source link on the same time but it seems that for exemple if the original link is
Register a Domain, Find Hosting and Create a Website at Domain.com
but when downloading the file the link become -->
http:--domain.com-mysite-file.zip
so the file douesnt work :s
here is the coded im using
PHP Code:
<?php
include 'config.php';
$id = intval($_GET['id']);
$sql = mysql_query("select * from artist where id='$id'");
while($oop = mysql_fetch_array($sql))
{
$link = $oop['lien'];
$mo = str_replace("/","-",$link);
$content_len=@filesize($link);
Header("Content-type: application/zip");
Header("Content-type: octet-stream");
Header("Content-Disposition: attachment; filename=$oop[lien]");
if($content_len!=FALSE)
{
Header("Content-length: $content_len");
}
readfile($mo);
}
?>
__________________
|
|
|