|
Posted by Michael Trausch on 10/29/89 11:43
dv wrote:
> Hi,
>
> I have the following question,
> I have an application which transfers a csv file (via FTP) to the server
> then on the server I have a PHP script which put the content of the CSV into
> a mysql
> The question is now how can I start without manual interaction this PHP file
> ?
>
If the application runs on UNIX, the best way to do this would be
probably be to have the thing start an SSH session and execute the PHP
script directly; however you have to have SSH access to the host on
which PHP is running to do so.
The way to do it would be to create an SSH key for a single purpose. A
good tutorial on that is on the web at:
http://www.arches.uga.edu/~pkeck/ssh/
If that won't work for you, then you should just put the PHP script
somewhere in the web namespace and have your application call it
directly. You can do that by opening a connection to port 80, and
sending an appropriate GET string to run the script. In addition, you
can have the script throw output, but you would need to parse the HTTP
headers that are returned before the script's output.
HTH,
Mike
Navigation:
[Reply to this message]
|