EXE file running in Web Page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

stantheman
Forum Commoner
Posts: 38
Joined: Wed May 26, 2004 8:57 am

EXE file running in Web Page

Post by stantheman »

I was wondering if there is a way to run and exe file right on the web page. I have a virtual tour which is a exe file and i want it to open and run upon opening the window
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

There are manny ways i think to do so,

either in java or php ( with prompting the user ofcourse, if he indeed wants to do so. )

did you check

Code: Select all

<?php
exec();
?>
http://www.php.net
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

exec won't work - it'll run a server installed file, but certainly not one that would pop-open onto a users machine like a traditional Windows application. The only way is to make the user download the exe first - you cannot just execute it on their behalf, think of all the trouble it would cause if you could.

Best bet is probably to re-write the application in a "web friendly" language like Flash or Java.
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

i have seen some sites that use executables for thier pages, not sure what language it is written in but they pass varriables to the executable just like anything else, not sure if it is just messing with the user because it would not be too hard to make a .php file a .exe file, just tell apache to parse .exe files with the apache interpreter, might make problems on a windows server.....but not on a linux server....


....mind you this is just useless babble...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the exe's are generally cgi scripts written in C or other compiled native binary language. they're pretty simple to write.. just process argv and argc.. :)
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Not really the same thing as the original poster asked for though is it?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

no. which is why I'm shutting up.
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Heh.. my post wasn't aimed at you - look at the posting times, you got in just too soon :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

heh.. oops.. :P
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

no it's not and i believe the answer to his question is no not from the server, you can start a program on the client's computer but you cant have them open a file from the server, they would have to download it first as said before
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Other way around dull - you can't start a program on a clients computer, but you can force a file at them to download and then hope to god they know how to open it.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Have you tried making an ActiveX EXE component? And then implementing it into the site? What language are you programming this visual tour in?
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

acctually i know that you can launch a program on a clients computer, have you ever been on http://www.aim.com after registering a s/n there is a link that uses javascript to launch aim on your computer, not sure how it works but i know it can be done
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

it doesn't use javascript. After you've installed AIM, it also creates a new protocol handler (aim) so you can use url like aim:goim, aim:gocaht, and if you just have aim: it will start AIM. viewtopic.php?t=20345
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Yup - just think for a second what absolute havoc could be caused if a web site could launch an EXE on your PC!! Hmmm.. "format C:" anyone? See what I mean? Browsers are (supposed!) to run in an enclosed secure environment.
Post Reply