HOME > > > > >

Net_UserAgent_Mobile_EZweb

サンプル

初期化

  1. <?php
  2. require_once 'Net/UserAgent/Mobile.php';
  3. $mobile = Net_UserAgent_Mobile::factory('KDDI-SA31 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0');
  4. ?>

name

  1. <?php
  2. var_dump($mobile->name);
  3. ?>

実行結果

string(10) "UP.Browser"

version

  1. <?php
  2. var_dump($mobile->version);
  3. ?>

実行結果

string(19) "6.2.0.7.3.129 (GUI)"

getUserAgent()

  1. <?php
  2. var_dump($mobile->getUserAgent());
  3. ?>

実行結果

string(48) "KDDI-SA31 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0"

getHeader($header)

  1. <?php
  2. echo htmlspecialchars($mobile->getHeader('REFERER'), ENT_QUOTES, mb_internal_encoding());
  3. ?>

実行結果

getName()

  1. <?php
  2. var_dump($mobile->getName());
  3. ?>

実行結果

string(10) "UP.Browser"

getDisplay()

  1. <?php
  2. var_dump($mobile->getDisplay());
  3. ?>

実行結果

object(Net_UserAgent_Mobile_Display)#162 (6) { ["_width"]=> int(0) ["_height"]=> int(0) ["_depth"]=> int(0) ["_color"]=> bool(false) ["_widthBytes"]=> int(0) ["_heightBytes"]=> int(0) }

getVersion()

  1. <?php
  2. var_dump($mobile->getVersion());
  3. ?>

実行結果

string(19) "6.2.0.7.3.129 (GUI)"

noMatch()

  1. <?php
  2. $error = $mobile->noMatch();
  3. echo $error->getMessage();
  4. ?>

実行結果

KDDI-SA31 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0: might be new variants. Please contact the author of Net_UserAgent_Mobile!

parse($userAgent)

  1. <?php
  2. var_dump($mobile->parse($userAgent));
  3. ?>

実行結果

NULL

makeDisplay()

  1. <?php
  2. var_dump($mobile->makeDisplay());
  3. ?>

実行結果

object(Net_UserAgent_Mobile_Display)#164 (6) { ["_width"]=> int(0) ["_height"]=> int(0) ["_depth"]=> int(0) ["_color"]=> bool(false) ["_widthBytes"]=> int(0) ["_heightBytes"]=> int(0) }

isDoCoMo()

  1. <?php
  2. var_dump($mobile->isDoCoMo());
  3. ?>

実行結果

bool(false)

isJPhone()

  1. <?php
  2. var_dump($mobile->isJPhone());
  3. ?>

実行結果

bool(false)

isVodafone()

  1. <?php
  2. var_dump($mobile->isVodafone());
  3. ?>

実行結果

bool(false)

isEZweb()

  1. <?php
  2. var_dump($mobile->isEZweb());
  3. ?>

実行結果

bool(true)

isAirHPhone()

  1. <?php
  2. var_dump($mobile->isAirHPhone());
  3. ?>

実行結果

bool(false)

isNonMobile()

  1. <?php
  2. var_dump($mobile->isNonMobile());
  3. ?>

実行結果

bool(false)

isTUKa()

  1. <?php
  2. var_dump($mobile->isTUKa());
  3. ?>

実行結果

bool(false)

isWAP1()

  1. <?php
  2. var_dump($mobile->isWAP1());
  3. ?>

実行結果

bool(false)

isWAP2()

  1. <?php
  2. var_dump($mobile->isWAP2());
  3. ?>

実行結果

bool(true)

getCarrierShortName()

  1. <?php
  2. var_dump($mobile->getCarrierShortName());
  3. ?>

実行結果

string(1) "E"

getCarrierLongName()

  1. <?php
  2. var_dump($mobile->getCarrierLongName());
  3. ?>

実行結果

string(5) "EZweb"

isSoftBank()

  1. <?php
  2. var_dump($mobile->isSoftBank());
  3. ?>

実行結果

bool(false)

isWillcom()

  1. <?php
  2. var_dump($mobile->isWillcom());
  3. ?>

実行結果

bool(false)

getModel()

  1. <?php
  2. var_dump($mobile->getModel());
  3. ?>

実行結果

string(4) "SA31"

getRawModel()

  1. <?php
  2. var_dump($mobile->getRawModel());
  3. ?>

実行結果

string(4) "SA31"

getUID()

  1. <?php
  2. var_dump($mobile->getUID());
  3. ?>

実行結果

NULL