Jump to content

Search the Community

Showing results for tags 'ftp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 14 results

  1. Hey all, Im trying to create a php script to replicate the following weather radar http://www.bom.gov.au/products/IDR703.loop.shtml they have supplied people with a ftp (it has no user/pass) ftp://ftp2.bom.gov.au/anon/gen/radar/ so this is my code and it wont even connect. <?php $ftp_server = "ftp2.bom.gov.au"; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); ?> I think it might be the ftp itself?
  2. I want to do a daily auto update from a CSV that's being placed via FTP heres how the structure looks: My program: Domain->Subdomain->files Target CSV: Domain->FTPDir->.csv Is there anyway to access this file without having to open up an ftp connection every time? Also I know what time the file is placed everyday. Is there something I can set up to auto run the update script everyday at that time or even set up an event listener to know when the file has been placed?
  3. (As usual, this is a different type of question; if it's in the wrong forum please move it.) I own two domains: example.com and example.ru. These sites are essentially mirrors of each other but they provide better geo-awareness than having only one site. If I have files that I need to copy from example.com to example.ru on a semi-regular basis, how do I do this programmatically? Obviously I have the login credentials, nameservers, IP addresses, and whatever else of both servers. What's the code to accomplish this? I have not ever tried to send files from one server to another. It certainly would be better than FTPing the files down to a local machine and then FTPing back up to the other server. Thanks...
  4. newhip


    Ok I have a problem... My sever has a max_file_upload of 2mb that can't be modified. I need to load larger files than that through a form and not a client like filezila or wtv. I've looked through so many documents looking to find the answer and have found none. Does anyone know how this can be done? I want this to be done through php. I'm thinking maybe breaking down the file or using php ftp or something but have no idea where to start! HELP!!!
  5. Hello! I want upload user file into some sites (those are mine). In fact after uploading file into default site, I want send the file into other site via FTP.
  6. $host = 'XXXXXXXXXXX' $usr = 'XXXXXXXXXXX'; $pwd = 'XXXXXXXXXXX'; $destDir = $_POST['filetype']; $conn_id=ftp_connect($host); $success = ftp_login($conn_id,$usr,$pwd); $rightName = basename($_FILES['uploadfile']['name']); ftp_pasv($conn_id, true); if($success) { ftp_put($conn_id,$destDir.'/'.$rightName,$_FILES['uploadfile']['tmp_name'],FTP_BINARY) or die('Cannot ftp'); ftp_close($conn_id); echo ' Upload Successful'; } The form I am using for upload is this: <form enctype="multipart/form-data" action="upload.php" method="POST"> Type of file: <input name="filetype" id="filetype1" /><br /> Choose a file to upload:<input name="uploadfile" type="file" /><br /> <input type="submit" value="Upload File" /> I have tried multiple options. 'ftp_put' from php's tmp upload location to a working directory and then to a destination directory and 'ftp_put' directly from temporary upload directory of PHP to the desired directory but FTP for some reason does not seem to work at all. It just simply dies. A normal upload using 'move_uploaded_files()' works perfectly. In some of the forums it is mentioned that for ftp to work I can't have 'file' input type and just have a plain text box. I don't understand why that needs to be the case or even if it true. Why is the above code not working? I have checked the permissions on the destination folder and it should not be the issue.
  7. Hey guys, I've searched this and couldn't find a way to do it that works. I'm looking for a form, that has a file upload button and a submit button. Once the user clicks submit, the selected file gets uploaded on the users ftp. I'm using godaddy as my hosting. Does anyone know how to approach this?
  8. Hi, Hi, I am getting files from FTP as follows: $homepage = file_get_contents('ftp://usr:pass@'); I wonder if there is a way to get the files according to the creation date or modification date? or if it is NOT possible, can I somehow get the file name and get the 6-40-1010 portion as follows? 6-40 1010
  9. Hi there. I love your forum and have been really into php lately, so I thought I would get involved. I do have a question though. I have been using Filezilla as my ftp and it has been working greatly with the following info: User: code2288 Password: mypass (Obviously different) Host: I get his error when I try it in my php code: Here is my code if anyone can help me <html> <head> </head> <body> <?php // variables $ftp_server = ""; //$ftp_server = "www.code-crash.com"; $ftp_user_name = "code2288"; $ftp_user_pass = "Texascrash3!"; $destination_file = "images/catalogue/".$_FILES['image']['name']; $sourcefile = $_FILES['image']['name']; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // check connection 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); // line 30 // check upload status if (!$upload) { echo "FTP upload has failed!"; } else { echo "Uploaded $source_file to $ftp_server as $destination_file"; } // close the FTP stream ftp_close($conn_id); ?> </body> </html>
  10. Hi, I am new to PHP.So any help would be great. I would like to display a drop down list and a textbox on a page. This dropdown data will be populated from a textbox. What I would like to know is, how to: parse a file and extact some data from a txt file which is on a server. populate this dropdown on the page with the data also I would like to display another data on the textbox according to the data selected on the drop down list and of couse how to test this script etc. Best Regards.
  11. Hi everybody ! I have a big problem with my images on my FTP... A friend has uploaded thousands of images with a "+" character in the filename on our FTP. For some reasons, my CMS doesn't support it and I need to change the "+" character by a "_" character, directly on the FTP cause it will rake too much time to download all the images and upload them again. So I need a script (PHP ?) that will go in the right subdirectory and replace the "+" if it exists by the "_" character. Someone could help me ? Thanks, Cedric
  12. Hi All, I'm trying to set up some code to download a CSV file from an ftp host and then i want to do something with it. However, i can't quite get the code to work. I get the following error: Warning: ftp_get() [function.ftp-get]: Failed to open file. in /home/rsyr/restofthedirectories/ on line 8 Here's the code, excuse the messiness: <?php $today = date("Y-m-d"); $conn = ftp_connect("ftp.zois.co.uk") or die("Could not connect"); ftp_login($conn,"anonymous",""); echo "JCP-scrape-". $today; echo ftp_get($conn,"JCP-scrape-18-10-2012.csv", "/pub/jcp/JCP-scrape-18-10-2012.csv", FTP_ASCII); ftp_close($conn); //sql code to move data from holding table to vacancy table //INSERT INTO vacancy (title, jobref, location, description, apply) SELECT title, reference, location, description, apply FROM holdingtable //truncate holdingtable //Holding table should then be truncated ?> Thanks
  13. Hello in need of some help or pointers this is want im trying to archive: 1. User signs up at my website 2. user enters his ftp details into textbox 3. user then browers to folder on his server where he would like the install to begin 4. my server copys a folder that contains css, images, php files to his server 5. user can the access pre installed software i.e www.mywebsite.com/software/ how can i go about doing this?
  14. I have no experience of doing command-line stuff, so am hoping to find some way of installing Webalizer that uses simple ftp to upload files and some way of calling the program to run. 25 years internet experience and some ability with php/mysql, but I don't understand where the Webalizer files go (in a directory, yes, and with a log file to analyse) but *where* to put them and *how* to call them, I haven't figured out at all (yet). I have heard that the latest stable Webalizer version is 2.23 but (also) don't know where to get this from. Any help appreciated.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.