<?php
/**
 * @version        Somao_Search X1.0 9:23 2012-1-1 Somao $
 * @package        Somao_Search.Site
 * @copyright      Copyright (c) 2009 - 2012, Somao, Inc.
 * @license        http://www.somao123.com/
 * @link           http://www.somao.cc/
 */
$ua = $_SERVER["HTTP_USER_AGENT"];   
$t = $_GET["t"];   
$filename = "webunion.txt";   
$encoded_filename = urlencode($filename);   
$encoded_filename = str_replace("+", "%20", $encoded_filename);  
header("Content-Type: application/octet-stream");   
if (preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']) ) {
    header('Content-Disposition:  attachment; filename="' . $encoded_filename . '"');   
} elseif (preg_match("/Firefox/", $_SERVER['HTTP_USER_AGENT'])) {   
    header('Content-Disposition: attachment; filename*="utf8' .  $filename . '"');   
} else {   
    header('Content-Disposition: attachment; filename="' .  $filename . '"');   
}  
echo $t; 

