User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 428,202 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,231 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

browser detect

Join Date: May 2008
Posts: 1
Reputation: crissrusso is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
crissrusso crissrusso is offline Offline
Newbie Poster

browser detect

  #1  
May 14th, 2008
the thing is to do 1 index.php wich detects browster Firefox and IE7 to redirekt it in http://examples.com/ , if it detects IE6 let it go directly to that saves code in examples.html Sample
how can i do it?

<?
$filename = "examples.html";
$realfile = "examples.html";
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$filename.";");
@readfile($realfile);
$counter = file_get_contents("examples");
(int)$counter++;
$fp=fopen("examples", "w");
fwrite($fp,$counter);
fclose($fp);
?>
Last edited by crissrusso : May 14th, 2008 at 8:01 pm.
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 3:12 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC