Posted by: shree5 January 2, 2006
Login in to Rate this Post:
0
?
Any help would be highly appreciated.
Please advise me on the strategy itself or help me shooot out a few troubles.
I have to transfer a file from a Windows machine to a Linux web (Apache) server. The
windows machine monitors/measures something and has to send the data to the server;
the concept is to be able to access that information almost "live" through the web. So,
the file-transfer thing has to be unattended and also recurring on a preset interval, say
every 10 mins.
My "latest" plan is to,
1. Create a web-page on the server that processes the file-upload from a trusted domain.
(this one done- fine with PHP). lets say: "pull.php"
2. Schdule (windows task scheduler) to invoke that URL address and pass the file as the
parameter. For this, I am scheduling a windows script (lets say, "push.vbs"- this one done)
that LOCALLY creates a html-form (lets say "upload.htm") on the fly which is auto-submitting
on the "body-onLoad" event to the (POST method) "pull.php" on the remote web server.
The form has a "file" input type, the value of which is the file that i want to pass on to the web
server.
Whenever my script is run, a browser window opens (for the local "upload.htm" created
on-the-fly). I can only shell-launch a job from windows scripts. Every hour, there are six browser
windows open.
Ques: Is there any way to invoke/excite/execute a URL without opening a browser window?
Then, I thought of redirecting. The local "upload.htm" will call "pull.php" on the server which will
redirect it to a "bye.htm" that publishes some javascript to kill the current window.
Ques: Is there any javascript means to kill the current window that is not opened by the javascript
itself? I played with self.close() and likewise stuffs but that again shows a confirmation alert like
"do you want to close the window?" before the window can actually be closed. (default browser is
IE in XP-Pro SP2)
OR,
Is there any means of unattended http-type file upload to a server from a windows machine? Or
any means that can be scheduled? (FTP not pref)
Thanks in advance
Please make me keep rolling...