Standard webpage and for Mobile question

Discussion in 'IT & Internet' started by Drachsi, Dec 21, 2011.

Thread Status:
Not open for further replies.
  1. Drachsi

    Drachsi UKBF Newcomer

    70 7
    I already have an existing website, but would like to have a section just for mobile visitors. Is there a php script (not javascript as this can be turned off) that can detect if a phone or browser, and direct to the appropiate page?

    It would seem like a normal request but I am having trouble finding a solution.

    Season's Greetings.
    Posted: Dec 21, 2011 By: Drachsi Member since: Jul 8, 2009
  2. fisicx

    fisicx Moderator
    Verified Business ✔️

    34,841 10,646
    Posted: Dec 21, 2011 By: fisicx Member since: Sep 12, 2006
  3. alphanumeric

    alphanumeric Contributor

    470 91
    Yep don't use js to do this due those blackberry things people use

    you can either use the php user_agent to detect the browser...

    or you can use css to detect the screen size

    for example:

    <link rel="stylesheet" media="screen and (device-height: 600px)" />

    personally i think this approach is better, but it really depends on how your site is coded.
    Posted: Dec 21, 2011 By: alphanumeric Member since: Jan 26, 2009
Thread Status:
Not open for further replies.