Source for file EZweb.php
Documentation is available at EZweb.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: KUBO Atsuhiro <kubo@isite.co.jp> |
// +----------------------------------------------------------------------+
// $Id: EZweb.php,v 1.13 2004/09/25 11:02:37 kuboa Exp $
require_once(dirname (__FILE__ ) . '/Common.php');
require_once(dirname (__FILE__ ) . '/Display.php');
* Net_UserAgent_Mobile_EZweb is a subclass of
* {@link Net_UserAgent_Mobile_Common}, which implements EZweb (WAP1.0/2.0)
* require_once('Net/UserAgent/Mobile.php');
* $_SERVER['HTTP_USER_AGENT'] = 'UP.Browser/3.01-HI02 UP.Link/3.2.1.2';
* $agent = &Net_UserAgent_Mobile::factory();
* printf("Name: %s\n", $agent->getName()); // 'UP.Browser'
* printf("Version: %s\n", $agent->getVersion()); // 3.01
* printf("DeviceID: %s\n", $agent->getDeviceID()); // 'HI02'
* printf("Server: %s\n", $agent->getServer()); // 'UP.Link/3.2.1.2'
* e.g.) 'UP.Browser/3.01-HI02 UP.Link/3.2.1.2 (Google WAP Proxy/1.0)'
* printf("Comment: %s\n", $agent->getComment()); // 'Google WAP Proxy/1.0'
* e.g.) 'KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1'
* if ($agent->isXHTMLCompliant()) {
* print "XHTML compliant!\n"; // true
* @package Net_UserAgent_Mobile
* @author KUBO Atsuhiro <kubo@isite.co.jp>
* @version $Revision: 1.13 $
* @see Net_UserAgent_Mobile_Common
* @link http://www.au.kddi.com/ezfactory/tec/spec/4_4.html
* @link http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html
* name of the model like 'P502i'
* server string like 'UP.Link/3.2.1.2'
* comment like 'Google WAP Proxy/1.0'
* whether it's XHTML compliant or not
var $_xhtmlCompliant = false;
* returns true if the agent is TU-Ka
$tuka = substr($this->_deviceID, 2 , 1 );
* parse HTTP_USER_AGENT string
if (preg_match('/^KDDI-(.*)/', $agent, $matches)) {
// KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
$this->_xhtmlCompliant = true;
list ($this->_deviceID, $browser, $opt, $this->_serverName) =
// UP.Browser/3.01-HI01 UP.Link/3.4.5.2
@list ($browser, $this->_serverName, $comment) =
list ($this->version, $this->_deviceID) =
$this->_model = $this->_deviceID;
* create a new {@link Net_UserAgent_Mobile_Display} class instance
* @return object a newly created {@link Net_UserAgent_Mobile_Display}
* @see Net_UserAgent_Mobile_Display
$depth = $screenDepth[0 ] ? pow(2 , (integer) $screenDepth[0 ]) : 0;
$this->getHeader('x-up-devcap-iscolor') === '1' ? true : false;
* returns name of the model (device ID) like 'TS21'
* returns device ID like 'TS21'
* returns server string like 'UP.Link/3.2.1.2'
return $this->_serverName;
* returns comment like 'Google WAP Proxy/1.0'. returns null if nothinng.
// {{{ isXHTMLCompliant()
* returns whether it's XHTML compliant or not
return $this->_xhtmlCompliant;
// {{{ getCarrierShortName()
* returns the short name of the carrier
// {{{ getCarrierLongName()
* returns the long name of the carrier
* c-hanging-comment-ender-p: nil
Documentation generated on Mon, 11 Mar 2019 14:16:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|