Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-19-2004, 11:52 AM   PM User | #1
Golden_Eagle
Regular Coder

 
Join Date: Jul 2002
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Golden_Eagle is an unknown quantity at this point
Server to Server FTP using PHP?

Is this possible? I have PHP and MYSQL available and would like to 'Pull' a log file from another server on a regular basis. The transfer does not need to reset/start from the begining, I would just like to download/append the log file that alreay exsists as thefile is likely to get very large.

The FTP I need to connect to is a Secure FTP using port 22, the log file needs to reside on my webserver and requires 'updating' every 24 hours.

I do not have 'shell' access, but crontab is enabled. I would prefer though to use PHP and have an indicator on site to show the progress of the download if possible. I now this maybe a tall order, but I thought I'd ask the guru's anyway!

The crontab can be setup in order to do this automatically, but if the log file needs to be update as a case of importance can PHP intervene?
Golden_Eagle is offline   Reply With Quote
Old 10-19-2004, 02:00 PM   PM User | #2
fci
Senior Coder

 
Join Date: Aug 2004
Location: Twin Cities
Posts: 1,345
Thanks: 0
Thanked 0 Times in 0 Posts
fci is an unknown quantity at this point
mmmm..
my thoughts are...
tar the log file then copy it to a web/ftp accessible area(hopefully you have permission to use those apps)..
if it is web accessible, then you can use wget to retrieve it if you're allowed to with shell_exec
if it is ftp accessible you can use the functions located here to retrieve it: http://us2.php.net/ftp

of course, someone else may have better advice...
fci is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:59 AM.


Advertisement
Log in to turn off these ads.