david963 Posted May 24, 2007 Share Posted May 24, 2007 I'm writing a program.php file that will be located on a remote server. Its purpose is to upload local files. More specifically, I would like to upload an extremely large file from my client's local computer running Windows XP by having them run any modern browser and browsing to program.php. I don't want to use the ordinary <input type=file ... /> uploading mechanism because it can't handle the size of the file (the server, not under my control, has a 2M size limitation, and there are other size limitations). The problem I am facing is that "local" to PHP means the server, and "local" to FTP also means the server. But I want to upload a file from my client's local Windows computer, which does not have PHP or an FTP server installed. I'm thinking I might do this with local scripting somehow, or by calling some Windows API from Javascript located in program.php. Maybe there is a better way than this, but I have no idea what it might be. Has anyone solved this problem before, or have a really good idea of how this can be done? Thanks! David Spector Springtime Software Quote Link to comment https://forums.phpfreaks.com/topic/52747-can-php-running-on-server-upload-a-local-file-without-inputfile/ Share on other sites More sharing options...
hitman6003 Posted May 24, 2007 Share Posted May 24, 2007 Use a java uploder? I don't think javascript will work...it's sandboxed to the browser. start here: http://www.google.com/search?source=ig&hl=en&q=java+applet+uploader&btnG=Google+Search Quote Link to comment https://forums.phpfreaks.com/topic/52747-can-php-running-on-server-upload-a-local-file-without-inputfile/#findComment-260455 Share on other sites More sharing options...
david963 Posted May 24, 2007 Author Share Posted May 24, 2007 Yes, of course javascript is sandboxed to prevent access to the local machine. However, its object model contains Windows file system and other objects that expose many aspects of the local machine. So, it may be possible to upload and download files (with the user's permission) using javascript. Your Java examples are interesting, but I'm not willing to learn Java to solve this problem. Perhaps I can write a very short executable program (in C++) or COM object (in C++) and install it locally. Then perhaps the local IP address could be passed to the server code. Can the server code use that address to call the local machine to upload or download the file? I have these vague ideas, but no concrete knowledge to move forward. Can anyone help? Thanks, David Quote Link to comment https://forums.phpfreaks.com/topic/52747-can-php-running-on-server-upload-a-local-file-without-inputfile/#findComment-260609 Share on other sites More sharing options...
david963 Posted May 26, 2007 Author Share Posted May 26, 2007 Never mind. I found ways to solve this problem. I guess this isn't a very advanced forum. Thanks anyway. David Quote Link to comment https://forums.phpfreaks.com/topic/52747-can-php-running-on-server-upload-a-local-file-without-inputfile/#findComment-262014 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.