Jump to content

Site is different when visited by a cell

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
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!
Checkout my new forum! http://adminreference.com/

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
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
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
I figured that much, lol.

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
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
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_*

Guest_Jordan_*
  • Guests
Once I get back from vacation I will send you the code. It is a free vBulletin script that I found on vbulletin.org.

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Where have you gone?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#7
Guest_Jordan_*

Guest_Jordan_*
  • Guests

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