php

Status
Not open for further replies.

nimd4

New Member
Messages
21
Reaction score
0
Points
0
Code:
<?php
if (!stristr($_SERVER['HTTP_USER_AGENT'], "Firefox")) {
header( 'location:http://your-firefox-promo-page/' );
exit();
}
echo('HTTP_USER_AGENT identified as Firefox');
?>
This code will (header) redirect anything that does not have "Firefox" in its HTTP_USER_AGENT (to location:) and will run the rest of the page otherwise (in this case it’ll print "HTTP_USER_AGENT identified as Firefox")..:)
 
Status
Not open for further replies.
Top