проблему решили, тему можно закрыть#
if (!file_exists('files/'.$_GET['f']))
{
$content = file_get_contents($url.'?act=game&id='.$_GET['id']);
$content = substr($content, strpos($content, '<img src="?act=img'),strlen($content));
$content = substr($content, strpos($content, 'f=')+2,strlen($content));
$link = substr($content, 0, strpos($content, '"'));
$link = str_replace(basename($link),'',$link);
$fcontent = file_get_contents($url.$link.basename($_GET['f']));
if (substr_count($fcontent, '<b>'))
{
$fcontent = substr($fcontent, 128, strlen($fcontent));
}
$fp = fopen('files/'.$_GET['f'],'w');
fwrite($fp, $fcontent);
fclose($fp);
}
$file = 'files/'.$_GET['f'];
header('Content-type: text/vnd.sun.j2me.application');
header('Content-Disposition: attachment; filename='.basename($file));
echo file_get_contents($file);
}