Problem In proper Mime type,header

Started on the old forum in December 2011 · view the original in the archive · old links redirect here

No replies · 337 views · started 14 years ago · 1 min read

shushant Developer · 207 posts #1

Any1 Pls help Me whats Error in dis code

<?
include 'inc/connect.php';
$i = secure('c');
$game = mysql_query("SELECT * FROM game WHERE id='$i'") or die("Error : File Not Found");
$My = mysql_fetch_array($game);
$name = $My['name'];
$link = $My['link'];
$Load = $My['download'];
$size = $My['size'];
$nLoad = $Load + 1;
//Saving It Too Database ... $upx = mysql_query("UPDATE game SET download='$nLoad' WHERE id='$i'") or die("Error Error In Processing");

if(eregi("\.sis",$link)){
$mime = "application/vnd.symbian.install";
$xtn = ".sis";
}
elseif(eregi("\.sisx",$link)){
$mime = "x-epoc/x-sisx-app";
$xtn = ".sisx"; 
}
elseif(eregi("\.jar",$link))
{
$mime = "application/java-archive";
$xtn = ".jar";
}
header("Content-type: $mime");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=$name.$xtn");
readfile("$link");
?>

Problem is when I Open Dat Link

its Showing File Name Pirates4.

And Filetype Unknow

I set Mime type But No Effect

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close