Hi, I'm looking for some code to enable me to force a link in Sea Monkey to open in IE.

Links on the web can't control what application they launch with, your OS and browser determines that. Why would you want to browse the web from one browser and launch the links in another?

What a dreadful page - no doctype for a start, so it is designed in quirks mode! then it refers to IE5 and Netscape 4.5, and Flash 5 !!!
That page is an antique from a previous century - actually it says 2001, which makes it even worse, as css had been around for about five years by then, yet it uses tables for layout and in-line styles.

so just open IE and view it.

not possible to force a specific type of browser to open with. but u can prompt them to open with ie if opened with other browsers. (Eg Warning messages)

Mac
Linux
FreeBSD

precisely How do you get those systems to open IE ?

you could use :

$id = $HTTP_GET_VARS['id'];
$sites = array(
   'http://housecall.trendmicro.com/housecall/start_corp.asp',  //TrendMicro Housecall
   'http://www.pandasoftware.com/products/activescan/com/activescan_principal.htm',  //Panda ActiveScan
   'http://security.symantec.com/sscv6/home.asp?langid=ie&venid=sym&close_parent=false'  //Symantec Virus Scan & Security Check
);
$redirectPage = $sites[$id];

//Determine if IE or not
$_SERVER=$HTTP_SERVER_VARS;
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ){
   if(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') ){
     $browser = 0;
   }
   else{
     $browser = 1;
   }
}
else{
   $browser = 0;
}

//Display the appropriate result
if($browser==0){  //not IE

echo exec('"C:\Program Files\Internet Explorer\iexplore.exe" '.$redirectPage.'');

}
else{  //IE
   header('location:'.$redirectPage);
}

save that in a file call ie_redir.php (or something) then add this HTML:

<A HREF="../IEtest/ie_redir.php?id=1" target="_blank">open in IE</A><br/>

ive amended some code i already had to make this work. hope it helps

... Because the site is rendered properly only by IE. Example:

- http://plasma.nationalgeographic.com/pearlharbor/ax/map.html

.

lol thats not the browser's fault. As mentioned, you should fix the coding errors, including adding a valid and complete doctype! Clean code and a valid doctype is the BEST way to ensure ALL browsers render properly. You can view the errors here.


AGGGGGGG 3 year old thread! lol I didn't look!

@almostbob your code is not working :/ the php is not work :// the code could redirect and open in Internet Explorer but it shows the code instead
I get this code:

$id = $HTTP_GET_VARS['id']; $sites = array( 'http://housecall.trendmicro.com/housecall/start_corp.asp', //TrendMicro Housecall 'http://www.pandasoftware.com/products/activescan/com/activescan_principal.htm', //Panda ActiveScan 'http://security.symantec.com/sscv6/home.asp?langid=ie&venid=sym&close_parent=false' //Symantec Virus Scan & Security Check ); $redirectPage = $sites[$id]; //Determine if IE or not $_SERVER=$HTTP_SERVER_VARS; if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ){ if(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') ){ $browser = 0; } else{ $browser = 1; } } else{ $browser = 0; } //Display the appropriate result if($browser==0){ //not IE echo exec('"C:\Program Files\Internet Explorer\iexplore.exe" '.$redirectPage.''); } else{ //IE header('location:'.$redirectPage); }