PDA

View Full Version : Browes Your Vivvo Site on Mobile "Wap"


g m
09-02-2007, 04:25 AM
Hello ! every body .
i just finished my little tools that allow your users to access your web site in wap mode
i has checked all users browsers to view wap versions with mobile browsers .
. to redirect all users who visit your site with wap to wap virsion please add this code in index.php after
<?
add this

$wap="http://wap.yoursite.com"; // edit this to your wap direction
if (!empty($_SERVER['HTTP_USER_AGENT']))
{
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
}
else if (!empty($HTTP_SERVER_VARS['HTTP_USER_AGENT']))
{
$HTTP_USER_AGENT = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
}
else if (!isset($HTTP_USER_AGENT))
{
$HTTP_USER_AGENT = '';
}
if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[2];
$browser_agent = 'opera';
}
else if (ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'ie';
}
else if (ereg('OmniWeb/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'omniweb';
}
else if (ereg('Netscape([0-9]{1})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'netscape';
}
else if (ereg('Mozilla/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'mozilla';
}
else if (ereg('Konqueror/([0-9].[0-9]{1,2})', $HTTP_USER_AGENT, $log_version))
{
$browser_version = $log_version[1];
$browser_agent = 'konqueror';
}
else
{
$browser_version = 0;
$browser_agent = 'other';
}
if($browser_agent='other'){
print"<META HTTP-EQUIV='REFRESH' Content=0;URL='$wap'>";
}


please create sub domain it will be cool . name it "wap"
the link will be
http://wap.yoursite.com
and the open attach file and edit configurations

///confige
$allow="allow";/// this option to allow users who use pc to see your wap pages set blank will refresh to main url
include"../include/conf.php"; /// place the direction to this files
include"../include/config.php";
include"../include/db_conn.php";
/// let's print our wap data ..


then upload file to wap folder . and enjoy with your website with wap version ;) ..
/// gm

Alex
09-02-2007, 09:54 AM
Actually, Vivvo 3.5 is accessible via mobile devices by default :) No need for separate sub-domain...
http://www.vivvo.net/whatsnew/feature2.php

g m
09-02-2007, 11:09 AM
Thank you Mr. Alex . about your note .
but this feature need mobile browser support web . but if you try with mobile not support web browsing ..

like Nokia 6600 , 6630 or Motorla L6 ,7 and more ..

this mobile can't see the vivvo like this future ..
you can test it !


so . i do this it help wap users to browse website

1st the prob with me that when i browse vivvo site demo on my mobile its Motorola L6 i can't and error apper
then i try to search in google.

google redirect me to Mobile Version . you can see here www.google.com/m
so when i type in search vivvo.net and enter demo website it apper but with another look that google custmize to can browse in Mobile which not support web browser ..
see this link
http://www.google.com/gwt/n?mrestrict=xhtml&site=search&q=http%3A%2F%2Fwww.myvivvo.com%2F&source=m&hl=ar&ei=P33aRuDfKZrWmwOGqcLQAw&ct=res&cd=1&rd=1&u=http%3A%2F%2Fwww.myvivvo.com%2F

so wap not support style sheet or flash or any thinge .. just data ,links , images ..

Finally thanks about your replay MR. ALex ... :)
Regardes