Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-20-2011, 08:09 AM Redirect windows
Extreme Talker

Posts: 193
Name: Adam Moseley
Trades: 0
How can I redirect a windows OS to another page?

Thanks
__________________

Please login or register to view this content. Registration is FREE
aadam is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-20-2011, 08:59 AM Re: Redirect windows
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
The only way I'm aware of to detect a user's OS is through the user_agent field. The value is determined from the user's request so it isn't 100% reliable. This code should work for typical users:

PHP Code:
if(stripos($_SERVER['HTTP_USER_AGENT'], 'windows') !== false)
     
header('Location: somepage.php'); 
Just curious, why do you need to redirect windows users?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 08-27-2011, 08:51 AM Re: Redirect windows
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by radiotiger View Post
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url="hxxpyoururldcom">
</head>
Errmmm? Did you not READ the question?


Your "solution" would redirect ALL user agents not Windows users only AND this is the PHP board whereas your offering is in HTML.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Redirect windows
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21397 seconds with 12 queries