Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > HTML Programming

HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-2008, 09:28 PM
beastilio beastilio is offline
Newbie
 
Join Date: Apr 2007
Posts: 10
Rep Power: 0
beastilio is on a distinguished road
Default User Agent Header Help

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-12-2008, 09:59 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,731
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

In PHP this is the user agent:
PHP Code:
$_SERVER['HTTP_USER_AGENT'
You could also use this function: get_browser()
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-13-2008, 06:43 PM
beastilio beastilio is offline
Newbie
 
Join Date: Apr 2007
Posts: 10
Rep Power: 0
beastilio is on a distinguished road
Default

Quote:
Originally Posted by Sidewinder View Post
In PHP this is the user agent:
PHP Code:
$_SERVER['HTTP_USER_AGENT'
You could also use this function: get_browser()

Working great! Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-14-2008, 06:38 AM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 7,327
Rep Power: 66
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-11-2008, 03:10 AM
Walls Walls is offline
Newbie
 
Join Date: Feb 2008
Location: Mobile Walls
Posts: 8
Rep Power: 0
Walls is on a distinguished road
Default

If you use SSI (server side include) where you have .shtml extension then you can use:
Code:
<!--#echo var="HTTP_USER_AGENT"-->
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -5. The time now is 11:58 PM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads