|
||||||
| HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hello again CodeCall!
I am wondering, how would I check the user agent for a website? I want to send anyone with: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 to another page on my site if they visit the index file. Thanks, Beastilio |
| Sponsored Links |
|
|
|
|||||
|
In PHP this is the user agent:
PHP Code:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
Quote:
Working great! Thanks! |
|
|||||
|
You can even use Javascript (but I would not advise it as it is client side)
Look at this (gives you much more than what you want): Get User Info, JavaScript Tutorial, Howto, Gather Visitor Information, Details, Web-Wise-Wizard |
|
|||
|
If you use SSI (server side include) where you have .shtml extension then you can use:
Code:
<!--#echo var="HTTP_USER_AGENT"--> |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to write the code for user to input command ? | worried_student | C and C++ | 3 | 12-26-2007 08:11 PM |
| Future Windows User Interfaces for Applications | totoliciu | Pascal/Delphi | 1 | 09-25-2007 08:59 AM |
| Global variables (SERVER) | Jaan | PHP Tutorials | 0 | 03-22-2007 09:43 PM |
| Java:Tutorial - User Input | John | Java Tutorials | 0 | 12-09-2006 07:25 PM |
| Storing a Secure Password | dirkfirst | PHP Forum | 7 | 07-22-2006 10:45 PM |
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| LogicKills | ........ | 20.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 67%