<?

error_reporting(0);
if($_SERVER['REQUEST_METHOD'] != "GET"||!(int)$_GET['software_id']){
	header("HTTP/1.0 404 Not Found");
 	echo "404 Not Found";
   exit;
}
define('SOFTPUBS_IN', true);
require_once(dirname(__FILE__) . '/includes/init.php');

$software_id		=	(int)$_GET['software_id'];
$sql					=	"SELECT * FROM {$db_obj->db_pre}software WHERE software_id='".$software_id."'";
$software_res		=	$db_obj->getRecord($sql);
$padlink				=	$software_res['padlink'];
if(preg_match('/^http:\/\/|https:\/\/.+/si',$padlink)){
	header('Location:'.$padlink);
	exit;
}else{
	header("Cache-Control: no-cache, must-revalidate");
	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
	header("Content-Type: application/xml; charset=utf-8");	
	if($padlink){
		$pad_str	=	file_get_contents($padlink);
		echo $pad_str;
		exit;
	}else{
	}
}	



