How do I redirect website from different user agent? for example I want to redirect website from following user agent
from desktop: redirect to Link1
from iphone: redirect to Link2
from android: redirect to Link3
from windows(say all versions): redirect to Link4
other: redirect to Link4
How do I achieve this in php?
EDIT: actually I don't the way of using $_SERVER['HTTP_USER_AGENT'];
for user agents that i had mentioned. I have checked the answers of stackoverflow regarding this but don't know how to use that.