Posts: 1,168
Name: Dragos-Valentin
Location: Cluj-Napoca, RO
|
Quote:
|
Originally Posted by Uche
Sorry pls we all speak English in this Forum , Can you please translate those Scripts to English so we could help you out.
|
i don't really believe that would be aproplem Uche, but here you have the transaltion. i did it for Raulica so he may have an answer when he's back:
PHP Code:
<?
// mysql values
$user = 'user';
$pass = 'pass';
$host = 'localhost';
$db = 'muzica';
// connection to database
mysql_connect($host,$user,$pass);
mysql_select_db($db);
// getting values
if(!strlen($_GET['id']))
{
die("no file specified<br>Click <a href='javascript: history.back(-1)'>here</a>");
}
global $HTTP_REFERER;
$url = parse_url($HTTP_REFERER);
if(($url['host'] != "www.anotherdomain.com") && ($url['host'] != "anotherdomain.com"))
{
echo "this file belongs to the site <a href='http://www.anotherdomain.com'>www.anotherdomain.com</a>";
die("<br>this file you can only find on the above mentioned website.");
}
$id = $_GET['id'];
$path = "/usr/local/psa/home/vhosts/domainname.com/httpdocs/muzica/lauRica/";
opendir($path);
$query = "select file from muzica where id = '$id'";
$row = mysql_fetch_array(mysql_query($query));
if(!mysql_error())
{
$file = $row['file'];
$path .= $file;
include $path;
}
else
{
echo "Error, the file does not exist on our server";
header("Location: $HTTP_REFERER");
}
?>
__________________
.
» Please remember to add to my Talkupation if you enjoyed my post. Thank you :)
.
|