[PHP-DB] sending data through FTP in PHP

2003-07-28 Thread OpenSource
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.

Re: [PHP-DB] sending data through FTP in PHP

2003-07-28 Thread colbey

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.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] sending data through FTP in PHP

2003-07-28 Thread OpenSource
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: [EMAIL PROTECTED]
To: OpenSource [EMAIL PROTECTED]
Cc: PHP-DB [EMAIL PROTECTED]
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.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php