> -----Original Message----- > From: Wei, Alice J. [mailto:ajwei@xxxxxxxxxxx] > Sent: Tuesday, June 24, 2008 4:07 PM > To: Boyd, Todd M.; php-general@xxxxxxxxxxxxx > Subject: RE: Include Problem ---8<--- snip > > I think that the variables passed to will be used by that code > to > > do perform some operations on another remote machine, (according to > > what I got from my client, he calls this behind the scenes to avoid > > users screw up the front end, and he is thinking of using C, Perl or > > Python), which is why I am hoping that I can produce one single > script, > > and have it execute some script without the user pushing any button. > I > > don't think I plan on "scraping" websites. However, if you are > > suggesting that it is easier to do in Ajax to do what I am intending > to > > do here, I would love to check it out and forget about PHP (hopefully > > not). > > > > Most of the documentation I have been seeing on exec() seems > to > > be executing UNIX commands at > > http://us2.php.net/manual/en/function.exec.php. One main issue, which > I > > am not sure if it is entirely relevant, is that I am using PHP on > > Windows with my current script, (the one to execute things from), > while > > the script that would be executed is located on a Linux machine. > Would > > this be an issue when I am doing this with what I am trying to do > here? > > Alice, > > exec() will execute Windows commands, as well. However, I'm not sure I > understand the reason for separating your script into two files--the > remote and the local scripts. > > To answer your question, I am separating these because the script > that will be placed on the remoate server is filled with dense > calculation operations, and putting these on the same server as the one > I am writing and running from the local machine would possibly take up > too much resources of the local server, and thus this only interacts > with the local server I am working with and not with the client > machine. > > I will assume you are gathering data in your script (local), shipping > this off to a script on the client's machine (remote), and passing a > program (C/Python/Whatever) values you gathered using your script > (local). > > --- > > That would be correect, although I am not passing this to a client > as I mentioned previously, and therefore everything would be ideally > executed directly without any person to invoke the script. > > Under this assumption, I would gather the data via > form/extraction/upload/whatever, and use cURL (a PHP library) to > "visit" > the remote script, passing values either via GET or POST. The remote > script would then parse these values and send them to the appropriate > exec() command. > > That sounds like something I have to do, but the question is, if > I don't have anyone pushing any button to invoke the script, how would > it execute without using GET or POST before it uses exec()? > > Hope this makes a little more sense now. Alice, I'm not sure I follow you. Are you speaking of the local script or the remote script as far as automation? The local script is executed when a user requests it. The remote script will be executed when your local script uses cURL to "visit" it. No users pressing buttons involved to my knowledge. Unless... is it a form? I'm a bit lost now. I'm not "Midwestern tourist in Malaysia" lost, but I'm definitely a bit confused. Todd Boyd Web Programmer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php