
ඕගොල්ලො ෆේස්බුක් එකට මොබයිල් ෆෝන් එකෙන් යද්දි අපිව යන්නෙ ෆේස්බුක් එකේ මොබයිල් වර්ශන් එකට නේ.අන්න ඒ වගේ ඔයාලගේ සයිට් එකටත් මොබයිල් එකෙන් විසිට් කරද්දි ඕගොල්ලො හදලා තියෙන සයිට් එකේ මොබයිල් වර්ශන් එකට යවන්න මේක උදව් කරගන්න පුලුවන්.
මුලින්ම මේක Download කරගන්න.
දැන් ඔගොලන්ට අදාල ෆයිල් එකට මේක කරාම යූස් කරන්න පුලුවන් පහසුවෙන්.
<?php
include 'mobile.php';
?>
ඕනෑම Mobile එකක් Detect කරගැනීම හා Redirect කිරීම.<?php
include 'mobile.php';
$mobile = new Mobile();
if ($mobile->isMobile) {
header("Location: m.yoursite.com");
}
?>
Android Mobile එකක් Detect කරගැනීම හා Redirect කිරීම.
<?php
include 'mobile.php';
$mobile = new Mobile();
if ($mobile->isAndroid) {
header("Location: android.yoursite.com");
}
?>
IPhone එකක් Detect කරගැනීම හා Redirect කිරීම.
<?php
include 'mobile.php';
$mobile = new Mobile();
if ($mobile->isIphone) {
header("Location: iphone.yoursite.com");
}
?>
මීට අමතරව පහත දෑ හදුනාගත හැක. Blackberry = isBlackberry;
Ipod = isIpod;
Ipad = isIpad;
Opera Mini = isOperaMini;
Palm = isPalm;
Windows = isWindows;
Other = isOther;
Android සහ අනෙකුත් ඕනෑම Mobile එකක් සමග භාවිතා කරන අයුරු.(මෙහිදී Android නම් එක් ලිපිනයකටත්, එසේ නොවන ඕනෑම අනෙක් Mobiles සදහා වෙනත් ලිපිනයකට යාමදි සිදු කරයි.)
<?php
include 'mobile.php';
$mobile = new Mobile();
if ($mobile->isAndroid) {
header("Location: android.yoursite.com");
} elseif ($mobile->isMobile) {
header("Location: m.yoursite.com");
}
?>
This can be used for any mobile virsion like this.