Re: sending data through FTP in PHP
| From: | OpenSource | Date: | Mon, 28 Jul 2003 19:06:30 +0000 |
| Subject: | Re: sending data through FTP in PHP | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29529@lists.php.net to get a copy of this message | ||
I'm given the IP and port to connect to.
I will then send my username and password in this format:
username|version\n
password\
the version number is just 4 characters of the program eg. "1.00"
I must then wait for a byte:
'0' - valid
'1' - invalid
then I am to send the data as
eg. L3200150.00
They should have another program on their end that will slurp up the data
and do whatever with it.
----- Original Message -----
From: <colbey@dreamwerx.net>
To: "OpenSource" <redhat@opensource.bz>
Cc: "PHP-DB" <php-db@lists.php.net>
Sent: Monday, July 28, 2003 12:47 PM
Subject: Re: [PHP-DB] sending data through FTP in PHP
>
> FTP is used to tranfer files, typically not "an array of data".. Depending
> what you mean.. From the sounds of things you need a protocol gateway
> instead of using FTP..
>
> Unless you are loading that array of data into a file on the remote server
> at which point something will slurp it up and wait for the next cycle..
>
> There are lots of built in FTP functions in PHP that are easy to use..
> make sure you compiled PHP with --enable-ftp ..
>
>
> On Mon, 28 Jul 2003, OpenSource wrote:
>
> > Hey Guys,
> >
> > I need some assistance on this FTP stuff.
> > I've got an array of data that I need to send via ftp to another server
> >
> > eg. $linea = array($sport.$rot1.$r_vl);
> >
> > This information is gotten from my database and needs to be sent to the
other server every 5 seconds.
> > I need to connect to the server then wait for a byte where "0" = valid
and "1" = invalid
> > than I am suppose to send the $linea info.
> >
> > can you give some pointers as to how I should go about doing this or if
you guys has any pre-written functions that I can follow through.
> > This is the first time I'm dealing with FTP in PHP.