Current location: Hot Scripts Forums » Programming Languages » PHP » how to restrict user to only use Internet Explorer


how to restrict user to only use Internet Explorer

Reply
  #1 (permalink)  
Old 04-28-05, 12:49 AM
upendrakumar upendrakumar is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy how to restrict user to only use Internet Explorer

i am making an elearning site for that i need to restrict the user to use only Internet Explorer

Plz Help me out soon.

Thanks in advance

upen dra kumar
Reply With Quote
  #2 (permalink)  
Old 04-28-05, 01:33 AM
olaf's Avatar
olaf olaf is offline
Newbie Coder
 
Join Date: Sep 2004
Location: The Netherlands
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
The only thing you can do is to ask him...
Reply With Quote
  #3 (permalink)  
Old 04-28-05, 04:35 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
you have posted about this before in Javascript:
http://www.programmingtalk.com/showthread.php?t=18072

why did you start a new thread about it again?
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #4 (permalink)  
Old 04-28-05, 05:22 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
well if you want it in PHP:

PHP Code:

<?php

$viewer 
getenv("HTTP_USER_AGENT");

//Not IE then redirect to google
if(!preg_match"/MSIE/i""$viewer) ) { header ("Location: http://www.google.com"); }
?>
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #5 (permalink)  
Old 04-28-05, 11:34 AM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
nice try but:
PHP Code:

function fakeBrowsing($page,$host) {

     
$fp fsockopen($host,80,$errno,$errstr,60);
     if(!
$fp) return 'Error '.$errno.': '.$errstr;
     
$req "GET $page HTTP/1.0\r\n";
     
$reg .= "User-agent: MSIE 6.0\r\n";
     
$reg .= "Connection: close\r\n\r\n";
     
fwrite($fp,$req);
     
$contents '';
     
$body false;
     while(!
feof($fp)) {
         
$line fgets($fp,1024);
         if(
$line == "\r\n"$body true;
         if(
$body$contents .= $line;
     }
     
fclose($fp);
     return 
$contents;

this function will set a fake browser header which will enable anyone with php-enabled server to get the content of the page.

instead of limiting visitor to your page to certain browser, imho it's better to write cross browser compatible page.

regards,
__________________
just an ignorant noob with moronic solution...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 flash websites for sale metamorph General Advertisements 5 01-09-05 10:03 PM
windows xp SP2 and Internet Explorer bsilby The Lounge 5 06-19-04 11:04 PM
Winxp service pack 2 and Internet Explorer bsilby JavaScript 0 06-14-04 11:46 PM
Check if user is connected to the Internet ! OMID SOFT Visual Basic 0 05-23-04 08:15 AM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 06:02 AM


All times are GMT -5. The time now is 06:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.