473,800 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Ftp's in php

158 New Member
What I need to accomplish is to upload a list of databases to a ftp server every 5 minuets.

Or if it is smarter to download the files.


One problem i am encountering when just uploading one db is the db does not upload all the way. Heres the code im using,

Expand|Select|Wrap|Line Numbers
  1. $ftp_server = '10.0.0.158';
  2.  
  3. $file = 'ICaudioDefaults.db';
  4.  
  5. $conn_id = ftp_connect($ftp_server);
  6.  
  7.  
  8. ftp_login($conn_id, "anonymous", "ds");
  9.  
  10.  
  11.   ftp_put($conn_id, $file, $file, FTP_ASCII);
  12.  echo "successfully uploaded $file\n";
  13.  
  14.  
  15. // close the connection
  16. ftp_close($conn_id);
  17.  
  18.  
Nov 12 '07 #1
1 1072
pbmods
5,821 Recognized Expert Expert
Heya, Kardon.

What do you want your code to do? Give an example.
What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.
Nov 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2631
by: MB | last post by:
I am writing an FTP Client using the NIO packages because I want to use the non-blocking functionality. I have done this successfully except for the fact that after I "put" an image file to the FTP server (Microsoft FTP server) I never get a valid response (226 Transer Complete) from the FTP server when the file has finished writing. I am using the FileChannel.TransferTo method with a non-blocking SocketChannel that is connected to the...
4
6041
by: Derek Timothy | last post by:
Hi folks I have strange problem using cmd.exe from asp code I am trying to save the results of an FTP command into a text file. When I run this command from the command line of the web server it creates the text file OK and it contains the results of the FTP commands. ftp.exe -s:test.ftp > c:\tempfile.txt However when I run it from asp using cmd.exe, it creates the file c:\tempfile.txt but there is nothing in it.
1
1797
by: Danny | last post by:
Hi all, I am using the Internet Data Transfer Library to ftp files to another server: http://www.mvps.org/access/modules/mdl0037.htm it works fine ftping to another server, but I cannot ftp from any server. I get an error that says cannot transfer file from ftp server. It is a runtime error and there are just a few references to it on google and no replies. I followed the format on the site above. Maybe it is because I can put this...
6
16395
by: Joseph | last post by:
Hi, I am trying to develop a C# application that will run on Windows that will do the following * Select file name to process * FTP the file to a UNIX server * Process this file on UNIX using a program on UNIX "./pgmname -options Infilename > OutputFilename" * FTP the output of this program back to Windows * Process the resultant file and create output report file
2
13008
by: Kumar | last post by:
Hi, I am trying to develop FTP client application using c#. Our application functinality should be like this: 1.our client uploads files,folders to our ftp server for every 20 minutes. 2.At the end of operation they will put one confirmation file (say Done.txt) to conirm their upload operation is completed in that cycle.
4
1530
by: psb | last post by:
I have a file upload Web page using System.Web.UI.HtmlControls.HtmlInputFile. Anyone have any issues uploading files using MacOS browsers of any sort?? Almost all of them bomb on our server. Is there something I need to put in the web.config or page directive that will allow ftp uploading on a Mac. What is funny is we have a ClassicASP file that does this, and it is WAY more reliable. It is nasty code -adodb.streams and all... ...
18
4355
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't get it to upload a file to the FTP server. I just get a "Cannot connect to remote server" error after this TRY: s = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
2
10695
by: chris | last post by:
Hi, I am trying to upload files on FTP and used the code below: Dim request As FtpWebRequest request = WebRequest.Create("ftp://ftp...../test.txt") request.Method = WebRequestMethods.Ftp.UploadFile request.Credentials = New
9
14221
by: niteck07 | last post by:
I am using following shell script to ftp files to another server but this is failing as the shell script changes the user name for the ftp login the correct user name is 'ag\invprint' which the script is fetching from a file using grep command but the ftp log says the script is trying to logon as user 'aginvprint' Looks like the script is removing the character '\' when trying to ftp Can someone please help and let me know how to...
1
4351
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning: Found only 0 objects in /root/.cpan/Metadata CPAN: LWP::UserAgent loaded ok
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.