Results 1 to 8 of 8
  1. #1
    Administrator Sgt.Muffin's Avatar
    Join Date
    Jul 2007
    Location
    Wisconsin, USA.
    Posts
    1,864

    Default PWC-Gaming Mobile

    I have just released a very beta version of our Mobile website. It is intended for devices that do not have the large screens and piles of bandwidth.

    the address is m.pwc-gaming.com

    I did not make this a hyperlink because if you click this on a computer it will throw the site's theme off for you. Not fun.
    Sgt.Muffin -- PWC-Networks Founder
    PWC-Gaming | Llama Punter | My Site | Empires Forums
    Network Specialist / Web Developer (PHP/MySQL)

    My UT Stuff: UltraBTimes (part of it) | Holly Jolly Deemer | MapCrypt | Grav Vortex Replace | Whipmatch 3
    My Web Stuff: Llama Punter Network | WebBTimes+ | Several PHP Apps (for my job)

  2. #2
    Administrator Aut's Avatar
    Join Date
    Jul 2007
    Location
    Wisconsin
    Posts
    312

    Default Re: PWC-Gaming Mobile

    Quote Originally Posted by Sgt.Muffin View Post
    I did not make this a hyperlink because if you click this on a computer it will throw the site's theme off for you. Not fun.
    Challenge Accepted.

  3. #3
    Forum Member Jon9908's Avatar
    Join Date
    Feb 2008
    Location
    WBL, Minnesota
    Posts
    375

    Default Re: PWC-Gaming Mobile

    awesome now I can visit the site more since I just got the internet on my phone

    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

  4. #4
    Senior Member Sapphire's Avatar
    Join Date
    May 2009
    Location
    NYC
    Posts
    451

    Default Re: PWC-Gaming Mobile

    muffin, YOU ROCK!!!

  5. #5
    Forum Member Jon9908's Avatar
    Join Date
    Feb 2008
    Location
    WBL, Minnesota
    Posts
    375

    Default Re: PWC-Gaming Mobile

    Yes I agree!!! The mobile site works great

  6. #6
    Senior Member Refresh's Avatar
    Join Date
    Sep 2010
    Location
    Upper left-hand corner of United States
    Posts
    69

    Default Re: PWC-Gaming Mobile

    Very cool! Just wondering, are you doing any kind of detection of mobile browser? or assuming that everyone that goes there is mobile?

    Am working on some mobile-related items for my own thing, and trying to figure out how to automatically detect a mobile device and redirect accordingly...

  7. #7
    Administrator Sgt.Muffin's Avatar
    Join Date
    Jul 2007
    Location
    Wisconsin, USA.
    Posts
    1,864

    Default Re: PWC-Gaming Mobile

    Quote Originally Posted by Refresh View Post
    Very cool! Just wondering, are you doing any kind of detection of mobile browser? or assuming that everyone that goes there is mobile?

    Am working on some mobile-related items for my own thing, and trying to figure out how to automatically detect a mobile device and redirect accordingly...
    As the self-proclaimed best web guy around, (Please do not fact check this) You do mobile detection using user_agent.

    Here is a great example.
    Code:
    <?php
    
    /**
     * Mobile Detect
     *
     * @license    http://www.opensource.org/licenses/mit-license.php The MIT License
     * @version    SVN: $Id: Mobile_Detect.php 3 2009-05-21 13:06:28Z vic.stanciu $
     */
    
    class Mobile_Detect {
        
        protected $accept;
        protected $userAgent;
        
        protected $isMobile     = false;
        protected $isAndroid    = null;
        protected $isBlackberry = null;
        protected $isOpera      = null;
        protected $isPalm       = null;
        protected $isWindows    = null;
        protected $isGeneric    = null;
    
        protected $devices = array(
            "android"       => "android",
            "blackberry"    => "blackberry",
            "iphone"        => "(iphone|ipod)",
            "opera"         => "opera mini",
            "palm"          => "(avantgo|blazer|elaine|hiptop|palm|plucker|xiino)",
            "windows"       => "windows ce; (iemobile|ppc|smartphone)",
            "generic"       => "(kindle|mobile|mmp|midp|o2|pda|pocket|psp|symbian|smartphone|treo|up.browser|up.link|vodafone|wap)"
        );
    
    
        public function __construct() {
            $this->userAgent = $_SERVER['HTTP_USER_AGENT'];
            $this->accept    = $_SERVER['HTTP_ACCEPT'];
    
            if (isset($_SERVER['HTTP_X_WAP_PROFILE'])|| isset($_SERVER['HTTP_PROFILE'])) {
                $this->isMobile = true;
            } elseif (strpos($this->accept,'text/vnd.wap.wml') > 0 || strpos($accept,'application/vnd.wap.xhtml+xml') > 0) {
                $this->isMobile = true;
            } else {
                foreach ($this->devices as $device => $regexp) {
                    if ($this->isDevice($device)) {
                        $this->isMobile = true;
                    }
                }
            }
        }
    
    
        /**
         * Overloads isAndroid() | isBlackberry() | isOpera() | isPalm() | isWindows() | isGeneric() through isDevice()
         *
         * @param string $name
         * @param array $arguments
         * @return bool
         */
        public function __call($name, $arguments) {
            $device = substr($name, 2);
            if ($name == "is" . ucfirst($device)) {
                return $this->isDevice($device);
            } else {
                trigger_error("Method $name not defined", E_USER_ERROR);
            }
        }
    
    
        /**
         * Returns true if any type of mobile device detected, including special ones
         * @return bool
         */
        public function isMobile() {
            return $this->isMobile;
        }
    
    
        protected function isDevice($device) {
            $var    = "is" . ucfirst($device);
            $return = $this->$var === null ? (bool) preg_match("/" . $this->devices[$device] . "/i", $this->userAgent) : $this->$var;
    
            if ($device != 'generic' && $return == true) {
                $this->isGeneric = false;
            }
    
            return $return;
        }
    }
    From this it may spark some ideas for you. Right now we do detection along with the option for people to visit m.pwc-gaming.com just incase the detection doesn't work, it isn't 100% as some phones have custom browsers.
    Sgt.Muffin -- PWC-Networks Founder
    PWC-Gaming | Llama Punter | My Site | Empires Forums
    Network Specialist / Web Developer (PHP/MySQL)

    My UT Stuff: UltraBTimes (part of it) | Holly Jolly Deemer | MapCrypt | Grav Vortex Replace | Whipmatch 3
    My Web Stuff: Llama Punter Network | WebBTimes+ | Several PHP Apps (for my job)

  8. #8
    Senior Member Refresh's Avatar
    Join Date
    Sep 2010
    Location
    Upper left-hand corner of United States
    Posts
    69

    Default

    defintely sparked, and thanks. I translated it to ASP, changed the string to be grabbed from MySQL (so I can update from the web interface), and lo, it works.

    Thanks again!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •