PHP framework for developing .mobi sites

I am desperate for a framework of PHP 5 that will work best for developing .mobi sites.

One of the main functions that it should contain is browser recognition for different phones, so that the site works correctly on all types of phones?

+3
source share
4 answers

CakePHP, which is part of the built-in RequestHandler component, checks the User Agent string for a large list of known devices and therefore can automatically display other content for these clients.

Here is a list that he compares with:

iPhone, MIDP, AvantGo, BlackBerry, J2ME, Opera Mini, DoCoMo, NetFront, Nokia, PalmOS, PalmSource, portalmmm, Plucker, ReqwirelessWeb, SonyEricsson, Symbian, UP.Browser, Windows CE, Xiino

CakePHP, , , .

+4

PHP Framework, . , , , . .

+2

Codeigniter .

.

User Agent , , , . , , .

: User Agent, , , , -, . , .

$this->load->library('user_agent');

if ($this->agent->is_browser())
{
    $agent = $this->agent->browser().' '.$this->agent->version();
}
elseif ($this->agent->is_robot())
{
    $agent = $this->agent->robot();
}
elseif ($this->agent->is_mobile())
{
    $agent = $this->agent->mobile();
}
else
{
    $agent = 'Unidentified User Agent';
}

echo $agent;

echo $this->agent->platform(); // Platform info (Windows, Linux, Mac, etc.)
+2

, , " ", , , , .

0

Source: https://habr.com/ru/post/1718678/


All Articles