Bulbe Posted August 4, 2008 Share Posted August 4, 2008 Tea for everyone, I've got this problem. I want to run a program with parameters directly from a web browser. It should work like this, i make a link: <a href="prg://abc123">Run it!</a> and when I click on it from a web browser, it will run a program defined on this protocol, let's open program.exe, and give a parameter so it will run "program.exe -command abc132". Similarly work e.g. your mail client. You click on a link "mailto:[email protected]" and it opens your client with a message, witch will be sent to [email protected]. Or maybe you know from Opera. You click on irc://irc.oftc.net and it opens irc client with irc.oftc.net server. Thanks for answers, Best Regard Bulb Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/ Share on other sites More sharing options...
Daniel0 Posted August 4, 2008 Share Posted August 4, 2008 You can't, and it's for security reasons. Otherwise you might run all sorts of malicious commands on the client computer. Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-607904 Share on other sites More sharing options...
proggR Posted August 4, 2008 Share Posted August 4, 2008 How do those web antiviruses work? I would assume searching clientside files would be off limits too but they do it. Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-607917 Share on other sites More sharing options...
Bulbe Posted August 4, 2008 Author Share Posted August 4, 2008 It's strange, when I open something in firefox, for example irc://irc.oftc.net and firefox doesn't know the irc:// protocol it throws an error that no program is defined for this protocol, so I thought there must be some way how to define it. Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-607919 Share on other sites More sharing options...
Daniel0 Posted August 4, 2008 Share Posted August 4, 2008 How do those web antiviruses work? I would assume searching clientside files would be off limits too but they do it. Maybe they're running a Java applet or something which will grant them access to do that. It's strange, when I open something in firefox, for example irc://irc.oftc.net and firefox doesn't know the irc:// protocol it throws an error that no program is defined for this protocol, so I thought there must be some way how to define it. Individual programs can register themselves with various "protocols" in Firefox, but even if you define your own, of what use would it then be seeing as it will only work on your computer? Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-607927 Share on other sites More sharing options...
.josh Posted August 4, 2008 Share Posted August 4, 2008 well, you kind of can. There are certain things you can do through things like java applets and activeX. Also I know several of the "online" virus scanners actually have you download a small program that acts like a client separate from a browser. And also, if you really wanted to go all out, you could always make your own browser via c++ etc.. and not impose such restrictions on it. Or change FF yourself, I mean, it IS open source... Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-607929 Share on other sites More sharing options...
neylitalo Posted August 4, 2008 Share Posted August 4, 2008 It's strange, when I open something in firefox, for example irc://irc.oftc.net and firefox doesn't know the irc:// protocol it throws an error that no program is defined for this protocol, so I thought there must be some way how to define it. You have to teach firefox how to handle the irc:// protocol. Opera already knows how, because it has a built-in IRC client, but firefox doesn't have anything like that. I believe the ChatZilla extension will fix that. These odd protocols are very rarely used in links, and with good reason - very few people have the means to use them. Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-607931 Share on other sites More sharing options...
Bulbe Posted August 4, 2008 Author Share Posted August 4, 2008 It's ok, i would write a step-by-step manual on my pages how to define this thing and people who want to have their life easier will use it, who don't, their problem. But I'm in situation that neither I know how to define a program to a protocol, so that's why I'm aksing for your help. Quote Link to comment https://forums.phpfreaks.com/topic/118134-open-program-from-web-browser/#findComment-608017 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.