savagenoob Posted October 7, 2009 Share Posted October 7, 2009 Is it possible to upload a file without a form and without the end user finding the file and clicking submit? I have a file that is in the same location on my local machine that I need to have uploaded when a certain page is accessed. I would pass local path of the file via GET and would look like: http://www.mysite.com/uploadrater.php?fp=C:\WinFSC\Shared\~4624-1.TMP. After upload I will be opening the file and parsing data from it. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/176803-file-upload/ Share on other sites More sharing options...
Dânêl Posted October 7, 2009 Share Posted October 7, 2009 I think the only way is to use PHP Socket and allowing your local machine to accept incoming connection and share that file. One way is to open the port number 80 and install a program acting as a http server or a ftp server (in this case you have to open port 21). Quote Link to comment https://forums.phpfreaks.com/topic/176803-file-upload/#findComment-932207 Share on other sites More sharing options...
hamza Posted October 7, 2009 Share Posted October 7, 2009 yeah socket is the one solution and you can use ftp functions in one file with defined file and there path. so it will upload to remote pc. Quote Link to comment https://forums.phpfreaks.com/topic/176803-file-upload/#findComment-932367 Share on other sites More sharing options...
Paystey Posted October 7, 2009 Share Posted October 7, 2009 What you're trying to do would be a HUGE security flaw if you were allowed. Most browser will block you from automatically picking a file and downloading it from the users machine without them being aware. So in short no. Quote Link to comment https://forums.phpfreaks.com/topic/176803-file-upload/#findComment-932370 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.