/* Enjoy!!! Dino Ciuffetti - dam2k@users.sourceforge.net
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program (COPYING); if not, go to http://www.fsf.org/ or write
* to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*
*/
/* HTTP RELATIVES */
/**
* cmsdAm HTTP handling class.
* This is the HTTP class, here you can retrieve some HTTP information, some variables are aliases
* of the config class.
* Class instance: $cms->http
* @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
*/
class cmsdam_http
{
/**
* You should not use this variable from your section.
* @access private
*/
var $conf; // Configuration class
/**
* This is the client IP address.
* @type str
*/
var $client_ip; // The client IP address
/**
* This is HTTP page max age time in seconds
* @type int
*/
var $http_maxage; // HTTP page max age time in seconds
/**
* This is HTTP page charset encoding
* @type str
*/
var $http_charset; // HTTP page charset
/**
* This is HTTP page content type
* @type str
*/
var $http_contenttype; // HTTP page content type
/**
* This method returns the browser preferred languages in a array
* @return array Returns the browser accepted language array
* @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
*/
function browser_languages() {
// Get the browser list of accepted languages
$rawlangs = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
// Make up the array
$arraylangs = explode(",", $rawlangs);
// Cleanup the array from spaces and ";"
for ($i=0; $i