473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Is it possible to do this??

Hi. Is it possible to make a php script that will redirect a guest to a
website, depending on which browser he uses??

I mean, IE doesn't keep the webstandards, so you could make a page for
IE users and one for Firefox users. If the user uses IE, when clicking
a link he will be redirected to that page and same thing with
Firefox...?

So you have two different pages...

cheers

Aug 3 '06 #1
3 1055
"Anders" <an***************@gmail.comwrote:
Hi. Is it possible to make a php script that will redirect a guest to a
website, depending on which browser he uses??

I mean, IE doesn't keep the webstandards, so you could make a page for
IE users and one for Firefox users. If the user uses IE, when clicking
a link he will be redirected to that page and same thing with
Firefox...?
Sure, just check $_SERVER['HTTP_USER_AGENT'] and then decide where to
send them with header("Location: wherever");

miguel
--
Photos from 40 countries on 5 continents: http://travel.u.nu
Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
Airports of the world: http://airport.u.nu
Aug 3 '06 #2
Sure, just check $_SERVER['HTTP_USER_AGENT'] and then decide where to
send them with header("Location: wherever");
I'll get on the anti-user_agent bandwagon and mention that the user
agent can be spoofed to represent a totally different browser than the
person is using.

I'd suggest you perform an additional javascript check on the client
side - using object detection and setting a cookie or modifying the URL
you will be going to in order to reflect the user's browser. But those
issues would best be resolved by asking in comp.lang.javascript

Aug 3 '06 #3
"bobzimuta" <ej******@gmail.comwrote:
>Sure, just check $_SERVER['HTTP_USER_AGENT'] and then decide where to
send them with header("Location: wherever");

I'll get on the anti-user_agent bandwagon and mention that the user
agent can be spoofed to represent a totally different browser than the
person is using.
But if someone is spoofing the user agent, they WANT to be handled like
that other browser, right? Why fight them?

miguel
--
Photos from 40 countries on 5 continents: http://travel.u.nu
Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
Airports of the world: http://airport.u.nu
Aug 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alvin Lau | last post by:
It is possible to write a bluetooth application software by C# in Pocket PC ? If it is possible , where can i find the reference or sample? ThX ~ *** Sent via Developersdex...
1
by: Lars | last post by:
I want to write a program that reacts on changes in another application. Is it possible to get a copy of (some of) the messages it recieves? Another approach is to watch for changes on the screen....
4
by: Ravikanth[MVP] | last post by:
Hi It is possible that IIS and SQL Server can reside on Seperate Machines and you can use Integrated Windows Authentication to connect. Ravikanth >-----Original Message-----
2
by: Ken Sturgeon | last post by:
Is it possible to execute an iSeries program from a VB.Net application? Where might I find some reference material that would get me started?
8
by: Mir Nazim | last post by:
Hello, I need to write scripts in which I need to generate all posible unique combinations of an integer list. Lists are a minimum 12 elements in size with very large number of possible...
17
by: binjobster | last post by:
Hello everyone, I'm updating some documents that describes so many C/C++ functions/method(about 2500). But I'm not familiar with these codes. So I want to find such a utility can generate...
1
by: Joe Peterson | last post by:
I've been doing a lot of searching on the topic of one of Python's more disturbing issues (at least to me): the fact that if a __del__ finalizer is defined and a cyclic (circular) reference is...
25
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
2
by: Kofa | last post by:
Dear All, I'd like to know whether it is possible to restore backups created on a production machine, running DB2 9.1 on Windows, using DMS table space containers, onto a developer's machine,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.