Redirect mobiles to mobile page?

aliasneo

New Member
Messages
71
Reaction score
0
Points
0
Hi guys, I have no idea about php programmming really, but I'm looking for a simple way to redirect mobile browsers to a mobile page (doesn't exist yet) maybe m.elaosta.com or elaosta.com/mobile?

If they're not mobile, just go to the standard index.html at elaosta.com

Any help would be appreciated,

Thanks.
 

oceanwap

New Member
Messages
24
Reaction score
0
Points
0
Since you don't have any idea about Php programming you can't use wurfl. Which is best for creating a mobile site. It is not a best approach to create two sites for two different browsers.A common business logic and different presentations or designs for different mobiles and web browsers are the best approach.Because maintainance of two sites with redundant content won't be easy.Even if you want to create two sites you have to use some server side logic like Php to redirect users to mobile site.Plenty of free and as well as paid scripts available on the web to do that.Just google on wap redirection.
 

aliasneo

New Member
Messages
71
Reaction score
0
Points
0
Actually my page is just a portal, it's a simple php with a couple of links (check out http://www.elaosta.com) i want to make anotehr version of this for mobile browsers because it doesnt load quite right on some devices. Anyway, I found this link but couldn't figure out exactly how to use this. I have run the generator and made my function call, but now sure how or where I set in the code for it to go to elaosta.com for the normal browsers otherwise go to elaosta.com/mobile.

http://detectmobilebrowsers.mobi/

the rest of the pages I link will take care of the mobile device by them selves (google pages and my wordpress blog with mobile theme).
 

oceanwap

New Member
Messages
24
Reaction score
0
Points
0
Just detect the mobile browsers using that function and redirect them. And do this on top of the home page(most probably index.php in document root). So you can redirect the mobile user using header.
if(it is mobile device)
{
header ("Location: http://www../mobile");
exit;
}
 
Last edited:

oceanwap

New Member
Messages
24
Reaction score
0
Points
0
@aliasneo.Your project is so simple and you don't need this. :)

I have written this for others who will browse this thread.
You can Download tera wurfl from http://www.tera-wurfl.com This is database driven api of wurfl faster than php api.
And run this script
PHP:
<?php
require_once('Tera-WURFL/TeraWurfl.php'); //your path to terawurfl.php
$user_agent = $_SERVER['HTTP_USER_AGENT'];
//For opera mini
$user_agent = isset( $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] ) ? $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] : $user_agent;
//Now we will hand over user agent to wurfl
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent($user_agent);
$device = $wurflObj->getDeviceCapability("is_wireless_device");
echo $device;
?>
This is how wurfl works, and there are many capabilities wurfl know about mobile device.For that read documentation on http://wurfl.sourceforge.net most important thing is that this is free and open source.
 

dei maru

New Member
Messages
5
Reaction score
0
Points
0
Hi guys, I have no idea about php programmming really, but I'm looking for a simple way to redirect mobile browsers to a mobile page (doesn't exist yet) maybe m.elaosta.com or elaosta.com/mobile?

If they're not mobile, just go to the standard index.html at elaosta.com

Any help would be appreciated,

Thanks.

Hola bro.. bueno hace unos dias tenia algo asi tambien tenia ese problema...
mira lo que encontrar un sitio web llamado http://www.mofusepremium.com/
el cual me parece muy bueno se llama MoFuse web con el cual podrás crear la versión para móviles de tu página web con tan sólo tres pasos.

Tan sólo tienes que crearte una cuenta (es gratuito) e introducir los datos de tu página web (dirección y nombre); de esta manera ya tendremos nuestra página web optimizada para móviles en la que incluso, y lo que seguro que atraerá a muchos, podremos introducir el nuevo programa de publicidad de Google para móviles.

Sitio web: http://www.mofusepremium.com/

te lo recomiendo chekalo no pierdes nada es muy facil.. :biggrin::biggrin:
 

aliasneo

New Member
Messages
71
Reaction score
0
Points
0
@aliasneo.Your project is so simple and you don't need this. :)

I have written this for others who will browse this thread.
You can Download tera wurfl from http://www.tera-wurfl.com This is database driven api of wurfl faster than php api.
And run this script
PHP:
<?php
require_once('Tera-WURFL/TeraWurfl.php'); //your path to terawurfl.php
$user_agent = $_SERVER['HTTP_USER_AGENT'];
//For opera mini
$user_agent = isset( $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] ) ? $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] : $user_agent;
//Now we will hand over user agent to wurfl
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent($user_agent);
$device = $wurflObj->getDeviceCapability("is_wireless_device");
echo $device;
?>
This is how wurfl works, and there are many capabilities wurfl know about mobile device.For that read documentation on http://wurfl.sourceforge.net most important thing is that this is free and open source.

Thanks, but where do I put this? I'm not too sure how it all works.

Hola bro.. bueno hace unos dias tenia algo asi tambien tenia ese problema...
mira lo que encontrar un sitio web llamado http://www.mofusepremium.com/
el cual me parece muy bueno se llama MoFuse web con el cual podrás crear la versión para móviles de tu página web con tan sólo tres pasos.

Tan sólo tienes que crearte una cuenta (es gratuito) e introducir los datos de tu página web (dirección y nombre); de esta manera ya tendremos nuestra página web optimizada para móviles en la que incluso, y lo que seguro que atraerá a muchos, podremos introducir el nuevo programa de publicidad de Google para móviles.

Sitio web: http://www.mofusepremium.com/

te lo recomiendo chekalo no pierdes nada es muy facil.. :biggrin::biggrin:

Muchas gracias, pero.....no es libre?
 

oceanwap

New Member
Messages
24
Reaction score
0
Points
0
Thanks, but where do I put this? I'm not too sure how it all works.
http://mobiforge.com/developing/story/introduction-wurfl
Articles like these can be helpful.It takes time to understanding how to use wurfl, due to lack of experience in php.
especially if you are not familier with classes(OOP) in php and databases(DBMS).

if you encounter any errors then mention here, so we can help.

more links

http://www.tera-wurfl.com/wiki/index.php/Downloads
http://www.tera-wurfl.com/wiki/index.php/Installation
 
Last edited:

tera-wurfl

New Member
Messages
2
Reaction score
0
Points
0
Hey guys, I'm Steve Kamerman, the author of Tera-WURFL. You should let Tera-WURFL figure out which user agent to use by not passing anything to the getDeviceCapabilitiesFromAgent() function. Here's the code to redirect users to a mobile site (replace http://yourwebsite.mobi/ with your mobile site):
PHP:
<?php
require_once('./TeraWurfl.php');
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();
 
// see if this client is on a wireless device
if($wurflObj->getDeviceCapability("is_wireless_device")){
	header("Location: http://yourwebsite.mobi/");
}
?>
 

SteadmanTech

New Member
Messages
1
Reaction score
0
Points
0
Steve,

I feel like I am so close but yet so far from getting this to work! Can you tell me if there is a step-by-step somewhere that can walk me through how to put all the pieces in the right places to make this work??

I've been searching the web off and on for months to try and solve this issue in a reliable/dependable fashion. Tera-WURFL seems like exactly the right answer and I have spent a fair bit of time reading on the website, but yet I can't quite seem to wrap my head around it.

All I ultimately want to do is reliably redirect mobile device users from my site home page to a mobile site home page. Seems simpler than it has turned out to be.

Looking forward to any insight you can offer!
Gary
 
Last edited:

bhupendra2895

New Member
Messages
554
Reaction score
20
Points
0
I am writing here step by step process to install tera-wurfl.
Step 1 Upload the tera-wurfl-2.1.2.zip file in your site root and extract it using cpanel file manager.
Step 2Now go to mysql databases section create a database called terawurfl and create a user for it, with all privileges.
Step 3Now open file manager in cPanel and go to Tera-WURFL(the folder you extracted) and open terawurflconfig.php in code editor.
Step 4Now we need to modify it so it can connect to database.In db host write localhost, in db_schema write the name of database you created.It should be in this format if you are in x10hosting :- your_cpanel_user_name_db_name_you_created.In db user and db password type user name and password of the user you created.Save this file.
Step 5Now open http://yoursite.com/Tera-WURFL/admin/install.php in your browser.If everything is ok.Then open http://yoursite.com/Tera-WURFL/admin/index.php and update the database using local file.After some time you will get message that database update is ok.Major work is done here.If any error occurs in this step just write here.I will help you.
Step 6Now we will check whether our installation is ok or not open http://yoursite.com/Tera-WURFL/admin/index.php in browser and click on tera wurfl test script.You should be able to see here the capabilities array, which shows the capabilities of mobile device.
Step 7Now you have installed tera wurfl.All you need to do now is to redirect the mobile user to mobile site.Follow the steve's(tera-wurfl) example and you should be able to do this.
Step 8Now for security delete file Tera-WURFL/admin/install.php and password protect this directory.
I am using this, so if you have any problem don't hesitate to write here.I will help you and if you need help from Steve then post in this forum http://tera-wurfl.com/forum
 
Top