Run FTP without upload file

This is a discussion on Run FTP without upload file within the PHP forums, part of the Web Development category; I try to write php script for upload or download using ftp. Below the script PHP: --------- $ftp_server = "localhost"; $...
 
Members Login.
 

Please register HERE to be part of our Community

PHP » Current Topics
 

Popular Social Groups.
 
The active BRL users
cwp (web development)
Malaysia Member
Richest Members

Contest of the Day.
 
Contest # 8 (Longest Thread Contest)

Invite Your Friends...
 

Invite your contacts from social groups / email address book to Join BRL.
Information is transmitted over secure channel.
We don't store any information.


Sponsors.
 



BRL Webmaster Forum » Programming & Web Development » Web Development » PHP » Run FTP without upload file

PHP Discussion related to PHP web development, PHP coding. Tutorials, source code, tips and tricks related to PHP programming.

Reply
  #1 (permalink)  
Old September 17th, 2007, 15:00 PM
Administrator

Join Date: Jun 2007
Posts: 3,709
BRL$: 42,936.15
Thanks: 0
Thanked 14 Times in 10 Posts
Rep Power: 409
Rss_Feeds is on a distinguished road
Default Run FTP without upload file

I try to write php script for upload or download using ftp. Below the script PHP: --------- $ftp_server = "localhost"; $ftp_user_name = "host"; $ftp_user_pass = "password"; $destination_file = "/ftp_server/sale.jpg"; //ftp server $source_file = "D:/sale.jpg"; //local machine $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); if ((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user_name"; exit; } else { echo "Connected to $ftp_server, for user $ftp_user_name"; } // upload the file $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY); // check upload status if (!$upload) { echo "FTP upload has failed!"; } else { echo "Uploaded $source_file to $ftp_server as $destination_file"; } ftp_close($conn_id); --------- What I want is when I open the script using browser, it will automatic upload or download file from server to my computer. And I put the script into another server that different with my computer. But I can't do that because the script will read the path for computer that use as a php server not local machine that I use Is it possible to create automatic script just with run the script without click browse button to upload or save as to download? If yes how can I do that? Thanks


To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts.
__________________
High Quality
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Powerful
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


Jobs In !!! - Post Jobs, Hire Employees, Create Blogs and Earn Money.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
file, ftp, run, upload


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free File Hosting - Unlimited File Size, Upload, Download, FTP Upload, No Timer +More Rss_Feeds Free Web Hosting Offers 13 January 8th, 2009 11:56 AM
How do upload a file from one PC to another PC using PHP? Rss_Feeds PHP 0 September 7th, 2007 00:10 AM
check file upload ext before upload?... Rss_Feeds PHP 0 July 21st, 2007 23:00 PM
Need help turning a IMAGE upload script into a File uploader Rss_Feeds PHP 0 July 15th, 2007 09:27 AM
Free File Hosting - Unlimited File Size, Upload, Download, FTP Upload, No Timer +More Rss_Feeds Free Web Hosting Offers 0 July 10th, 2007 10:07 AM


 
Terms Of Usage

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107