Re: FTP RAW

From: Date: Thu, 28 Mar 2002 16:05:15 +0000
Subject: Re: FTP RAW
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-90550@lists.php.net to get a copy of this message
I have written the code to upload using RAW FTP commands. Thank you. "Analysis & Solutions" <danielc@analysisandsolutions.com> wrote in message news:20020326205659.GA23116@panix.com... > Hey Chris: > > On Tue, Mar 26, 2002 at 12:44:21PM -0700, Chris wrote: > > OK. I don't know how I can be more specific, but I will try. > > Dude, let's look at your initial question to the list: > > >> Can anyone help me with the command I need for a RAW FTP file > >> upload? I can create connections and they empty file, but I have no > >> idea how to get the data into the file and I have tried everything. > > That's vague. Now that you've clarified a bit of how you're doing what > you're trying to do, let's see what we can do to help... > > > > I have used fopen(ftp://url) to upload files to the FTP server from a > > web form, however this fails on files over 5k in size. > > > > I do not have the FTP functions installed on the server I will be using. > > > > I simply want to know how I would use the raw FTP commands with an > > fsockopen() function. I know how to use this to connect to the file server, > > change directories, etc.. The question is how do I use the fsocket() with > > raw FTP commands to upload a file? Is that not specific? > > Just so I'm being clear, When I was talking about fopen(), fputs() and > fclose(), I meant you need to make a file on your local hard drive > first. I wasn't talking about using these functions directly with the > file pointer generated by fsockopen(). Anwyway, once the file is > created on your drive, THEN, you can use FTP to put the file on the > remote server. > > Okay, to be straight up, I haven't used PHP's socket functions yet. > It's cool, you're able log in and to cd into the right directory. Uh, > now what to do??? Let's see what the FRC for FTP says... > ftp://ftp.isi.edu/in-notes/rfc959.txt. How about trying: > > fputs($fp, "STOR ./foo.txt\r\n"); > > --Dan > > -- > PHP scripts that make your job easier > http://www.analysisandsolutions.com/code/ > SQL Solution | Layout Solution | Form Solution > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y

« previous php.general (#90550) next »