Hey guys, how do I make it so when a user visits the site via palm or some type of cell phone, it is totaly different. I want to be able to have it so when I go to my domain with a cell phone, it shows alternate domain names for them to visit the site..
any idea? Thanks!
Site is different when visited by a cell
Started by phpforfun, Jun 02 2008 10:33 PM
6 replies to this topic
#1
Posted 02 June 2008 - 10:33 PM
Checkout my new forum! http://adminreference.com/
|
|
|
#2
Guest_Jordan_*
Posted 03 June 2008 - 05:39 AM
Guest_Jordan_*
On CC there is a script that detects the connection type (PDA Phone, Cell Phone, iPhone) and if it is one of those types it forces the user to use a different template. You would need to replicate this procedure.
#3
Posted 03 June 2008 - 04:07 PM
I figured that much, lol.
Mind giving me all your passwords to CC so I can glance at the code? :P jk
Mind giving me all your passwords to CC so I can glance at the code? :P jk
Checkout my new forum! http://adminreference.com/
#4
Posted 03 June 2008 - 05:08 PM
Evan at Tonzr.com (great place to get ring tones) helped me out
/* detect mobile device*/
$ismobile = 0;
$container = $_SERVER['HTTP_USER_AGENT'];
// A list of mobile devices
$useragents = array (
'Blazer' ,
'Palm' ,
'Handspring' ,
'Nokia' ,
'Kyocera',
'Samsung' ,
'Motorola' ,
'Smartphone',
'Windows CE' ,
'Blackberry' ,
'WAP' ,
'SonyEricsson',
'PlayStation Portable',
'LG',
'MMP',
'OPWV',
'Symbian',
'EPOC',
);
foreach ( $useragents as $useragents ) {
if(strstr($container,$useragents)) {
$ismobile = 1;
}
}
Checkout my new forum! http://adminreference.com/
#5
Guest_Jordan_*
Posted 04 June 2008 - 04:25 AM
Guest_Jordan_*
Once I get back from vacation I will send you the code. It is a free vBulletin script that I found on vbulletin.org.
#7
Guest_Jordan_*
Posted 04 June 2008 - 04:40 PM
Guest_Jordan_*
Xav said:
Where have you gone?
Edisto Island in SC, USA. I am going to blog about it and post some pictures once I get back.
Posted via CodeCall Mobile


Sign In
Create Account


Back to top









