Open PHP link in another browser

0

I would like to open a link that I have on my page in a specific browser (IE). For example, if I'm using Google Chrome, I'd like to open the link in Internet Explorer when clicked. Is there a PHP function to help me?

    
asked by anonymous 14.05.2015 / 13:12

1 answer

1

There are two functions in php that can support the exec () and shell_exec ()

Example using exec :

exec("C:\Program Files (x86)\Mozilla Firefox\firefox.exe http://www.google.com.br");
  

But this will work on localhost, but it will not work on the web because PHP runs on the server, so it does not have access to client directories.

OBS: This will open the browser on the server, not on the client side.

OBS 2: If it were possible, you can not tell if the client has a certain browser installed.

OBS 3: In my opinion this violates the client's right to choose, because if the client chooses to use the X browser, he has his reasons and he certainly would not like to click a link and open the browser Y .

References:

Hardware

iMasters

    
14.05.2015 / 13:30