[TABLE="class: forum-post"]
[TR]
[TD="class: row2, bgcolor: #FAFAFA"]ch habe die Datei user_agent.php mit folgendem Code erstellt:
<?php
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
$ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad");
if ($iphone || $android || $palmpre || $ipod || $berry || $ipad == true)
{
echo "<script>window.location='http://mobile-version.de' ;</script>";
}
?>
[TABLE="class: forum-post"]
[TR]
[TD="class: row2, bgcolor: #FAFAFA"]Aus meiner index.html Datei habe ich eine index.php Datei gemacht und folgenden Code hinzugefügt:
<?php
include('user_agent.php');
?>
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]