PHP Upload File Without Form

I need a php script that would be able to upload a file on a pc without a form like this:

ww.mysite.com/upload.php?file=C:\myfile

is this possible?
XGenwareSAsked:
Who is Participating?
 
Lukasz ChmielewskiConnect With a Mentor Commented:
Not possible. PHP is server - side language, it cannot see anything beside the resident server. Java environment would be able to do this.
0
 
aqif_gCommented:
use POST method to submit form. This will hide URL parametres but work will goes exactly like this.

or use AJAX to send request to a file with these parameters attached. This way your page will not changes and you will remain on the same page.

regards,
aqif
0
 
XGenwareSAuthor Commented:
I don't want a form at all. I want just the script to be able to upload it, getting the file name from the url
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Dave BaldwinFixer of ProblemsCommented:
Isn't going to happen.  PHP running on the server does not have access to your computer.
0
 
aqif_gCommented:
the field you chose to read a file is of type 'file'. When submit that form which contains that file, complete info of file is passed to the page in action. on that page you read all file data using $_FILE.

All values in $_File are set when form is submited. There is no other way to red that.. You can make form submission apearently transparent but you cannot do this without using form.

regards,
aqif  
0
 
onemadeyeCommented:
well...

if what you tried to approach is ever possible then it would obviously be a serious major security hole.             
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.