Hmmmm....
Setup a CRON job using SCP or cURL. You can use SOAP or create your own similar system. I have never used SOAP but use the same principles.
Example: Company X needs some strange format of data (text file, CSV or whatever) delivered to them SECURELY at 5am EST. The company cannot afford to pay for any sane sysAdmin to do this at -7 GMT. Thanks to advances in PHP, the sane admin can now do what was once done via PERL and CRON; create a PHP shell script [executed by CRON] to do the following:
Pull data from a database, create this alleged data file, send the file via SCP or cURL. If you use cURL, the remote system has a script which receives your connection and parses alleged file. Security and parsing is another topic altogether.
PHP is a server side scripting language. A browser is just another way to view output from PHP.
PHP is so many fantastic things. It is generally less "malicious" than your needs purport. Sounds like you need the efficacies of javascript if the example above does not fit your scenario. Since most people ignore the wisdom of turning javascript off in their browsers, you should be able to take advantage of many of the "features" it provides. However, you need to visit a javascript list for anything down this path. If you are not forthcoming enough as to your intentions, you are most likely not going to receive any assistance simply because your idea sounds "malicious".
Programmers tend to keep the caveats of programming exploits unto themselves. However, it is just as likely that your intent is not malicious, and therefore you may wish to simply revise your question and description of the problem/scenario you are attempting to overcome. All in all, more information leads to... more information! :) I speak from experience. I post confusing questions at times too, which result in confused responses or links to manual pages I've already read more than once. The real solution to this aside is to post more detailed questions.
Victor C. wrote:
Thanks for answering Chris.. What if I want to send a file from my web server to another site for them to parse? I already know what file I want to send and I do not want to have to select the file by doing "browsing".
"Chris" <listschris@xxxxxxxxxxxxxxx> wrote in message
news:417D6F36.4000509@xxxxxxxxxxxxxxxxxx
toYou can't, at least you SHOULDN'T. Just think about what you're asking for, you want to download a file from a users computer, without them knowing about it.
Major security/privacy issues there that browsers try to prevent.
Chris
Victor C. wrote:
Hi,
I'm trying to submit a file from "index.php" to "index2.php". I know how
thedo file upload in PHP. On "index.php" I have:
<FORM ACTION="index2.php" METHOD=POST ENCTYPE="multipart/form-data"> <INPUT TYPE="file" NAME="myfile" SIZE=30> <INPUT TYPE="submit" NAME="Upload File"> </FORM>
The next page would only need to use $HTTP_POST_FILES['myfile'] to access the submitted file.
My question is: if I already know which file I want to submit, say
"file1.xml". How can I just ask "index.php"
to submit "file1.xml" to "index2.php"? Without asking the users to pick
file to upload?
Thanks a lot in advance!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php