
You are not logged in.
Do you want a new forum account? Send us an e-mail with your desired nick and we'll get it done! We recommend using a secondary, yet still actively used e-mail address - we're an old web and forum after all, so to be on the safe side just in case :-)
(If the link doesn't work for you, right-click on it and save the e-mail address for use in your e-mail client)
Well i saw it's not working and that's sad. I can help you if you doesn't know how to fix this.
You've to go through a page who will increment the download and echo the game with a mime type
header ("Content-type: application/octet-stream");
header('Content-Disposition: attachment; filename="'.$name.'"');
$target=$_GET['$target'];
$id=$_GET['id'];
//works better with a fopen ^^
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $target);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$data=curl_exec($ch);
curl_close($ch);
//echo the game, remember that with the mime type it's like this page become a real rec file
echo $data;
//updating the downloads
require("../lib/class.mysql.php");
$db=connect();
$query_top=mysql_query("SELECT dls FROM games WHERE id=$id LIMIT 1") or die(mysql_error());
$game=mysql_fetch_array($query_top)
$dls=$game['dls'];
$dls++;
$query_top=mysql_query("UPDATE games SET dls=$dls WHERE topic=$tid") or die(mysql_error());
deco($db);
Last edited by Soji (2008-05-11 10:29:46)
Offline
Soji wrote:
header ("Content-type: application/octet-stream");
header('Content-Disposition: attachment; filename="'.$name.'"');
That's very clever!
I haven't had much chance to work on the site since my classes started again, but I was wondering how I could get that to work.
Thanks man!
Offline
no prob
Offline