|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with FTP Transfer
I have a script I'm using for my file system which opens a remote file, opens an FTP connection to a server, and uploads the file to the FTP server. This works fine, unless there's a big file. The problem is that with a big file, it takes longer to transfer it. When the transfer passes a certain point(I'm not sure how long it is), it restarts. For example, if it's transferring a 50 MB file to the server, it'll be doing just fine until around 12-13 MB and then I'll refresh the FTP and it'll be at 1 MB, until it does it again. Here's the code:
PHP Code:
Any ideas? |
|
#2
|
||||
|
||||
|
About how much time would say between when you start the download and when it crashes?
__________________
Programming is easy. It's the thinking that's hard. Search the forums before you ask your question. PHP | MySQL websites. Visit them, read them, cherish them. Read the posting rules, before you post. See if your question has been answered already. |
|
#3
|
||||
|
||||
|
Try local
Might try saving the URL to a local tmp file and then use ftp_put to upload that.
|
|
#4
|
|||
|
|||
|
Quote:
Maybe 5-10 minutes, closer to 5. |
|
#5
|
||||
|
||||
|
Try using the IP address in the url and see if it happens. I seem to remember reading somewhere that ftp functions have a problem resolving hostnames.
|
|
#6
|
|||
|
|||
|
The FTP function is using a file pointer, not an actual URL with hostnames. I can't use the IP because the webservers' domains and IPs are the exact same(typing in the IP does not give the same results as typing in the host name).
|
|
#7
|
|||
|
|||
|
*bump*
|
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > Problem with FTP Transfer |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|