ftp_put w/out file upload - IS THIS POSSIBLE??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
clem_c_rock
Forum Commoner
Posts: 46
Joined: Mon Jun 07, 2004 9:18 am

ftp_put w/out file upload - IS THIS POSSIBLE??

Post by clem_c_rock »

hello,
I need to find a way to upload a file to a server w/out using the
<INPUT TYPE="FILE" NAME="uploaded_file">
method. I want to just provide the path of the file and send that to the ftp_put() function.

Is this possible or is there another way to transfer the file?

Thanks,
Clem C
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

this 'path' would be based on the server's location.. so it probably won't really help it, unless the file's on the server already, in which case, creating a path browser of sorts where you select the path/filename to send to the function for whatever it is you are doing.
clem_c_rock
Forum Commoner
Posts: 46
Joined: Mon Jun 07, 2004 9:18 am

Post by clem_c_rock »

I know this is desparate but this is what I'm trying to do:

$test_file = 'C:\Documents and Settings\All Users\Desktop\SITES\RESEAU_DESIGNS\ACCESS_MEDICAL\new_site\rexview.txt';
if( ftp_put( $conn_id, 'text_file.txt', $test_file, FTP_BINARY ) )

W/out browsing a file, it seems like uploading a file from a local computer to a server is nearly impossible as this could be a hacker's dream.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

unless you have an ftp or other form of server running on the local machine the server can access, or they are on the same network.. there is almost nothing the server can do without the help of the user, as it should be. Use the file upload.
Post Reply