02-06-2011
Another tip: mind the mode. If the file you are transferring is binary or you do not want FTP to mess with the end of lines use binary mode.
If this is a text file, then use ASCII mode. Ftp will convert the end of lines from <CR><LF> to just <LF> as is the custom on Linux.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am currently looking to write a script to transfer files from a windows NT server to a unix server any ideas of how to go about this? (1 Reply)
Discussion started by: chambala5
1 Replies
2. UNIX for Advanced & Expert Users
I have set up a samba share on my Linux server. I have a gigabit switch, gigabit NICs in each machine.
I have set up the /etc/samba/smb.conf to support no delay, 8192 send/receive buffers, etc. This helped the rate for Samba go from about 4MB/S to about 10MB/S, but I expect to see about... (1 Reply)
Discussion started by: perspectx
1 Replies
3. Shell Programming and Scripting
Hi,
I made a shell script to allow user to ftp file to windows shared drive.
Here is part of my code within my shell script:
/usr/bin/ftpmtc $usr $pswd $jobno
Within 'ftpmtc':
#ARGUMENT: USER,PASWD,JOBNO,VER,LOG_DATE,$$
$UCB/echo "user $1 $2" > $inst_file
$UCB/echo "cd prod" >> $inst_file... (7 Replies)
Discussion started by: whatisthis
7 Replies
4. Shell Programming and Scripting
Hi,
Please advice whether my below requirement is feasible,
My requirement : Automated FTP from linux server to windows server using a shell script on every monday.
If feasible, please help me how to do this ?
Thanks in advance (2 Replies)
Discussion started by: apsprabhu
2 Replies
5. Shell Programming and Scripting
Hi,
I want to transfer the approx 10k files available on UNIX Server to Windows Server using FTP Command. is it possible? how ?
Thanks in advance.
Sachin. (1 Reply)
Discussion started by: ssachins
1 Replies
6. UNIX for Advanced & Expert Users
Hi ,
I need to ftp some input files from windows to unix server.All the files will be saved in the C drive in my machine.Currently all these files are transferring manually to the unix server.I need to write a shell script which ftp the files from windows to unix box.When I searched in the forum i... (1 Reply)
Discussion started by: kavithakuttyk
1 Replies
7. AIX
Hi Friends,
I have this script for ftping files from AIX server to local windows xp.
#!/bin/sh
HOST='localsystem.net'
USER='myid_onlocal'
PASSWD='mypwd_onlocal'
FILE='file.txt' ##This is a file on server(AIX)
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have 9 different linux based servers and i am automating there healthcheckup by doing ssh and fetching deviations out of it in a single text file. I am doing so by using ssh keygen. I am done with the above part .
Now i want to ftp that text file to my windows XP desktop and i want to... (4 Replies)
Discussion started by: gemnian.g
4 Replies
9. Shell Programming and Scripting
HI,
I have to transfer files from linux server to windows using secure ftp (sftp) .Kindly help me out. (3 Replies)
Discussion started by: manushi88
3 Replies
10. Shell Programming and Scripting
Hello my dear friends,
Two file are auto generated from mon - fri at different directories on same windows box.Every day i have to copy the file, rename it (specific name)and ftp it to linux box specified directory.
is it possible to automate this process,If yes this has to be done from windows... (1 Reply)
Discussion started by: umesh yadav
1 Replies
LEARN ABOUT PHP
ftp_ssl_connect
FTP_SSL_CONNECT(3) 1 FTP_SSL_CONNECT(3)
ftp_ssl_connect - Opens an Secure SSL-FTP connection
SYNOPSIS
resource ftp_ssl_connect (string $host, [int $port = 21], [int $timeout = 90])
DESCRIPTION
ftp_ssl_connect(3) opens an explicit SSL-FTP connection to the specified $host.
Note
Why this function may not exist
ftp_ssl_connect(3) is only available if both the ftp module and the OpenSSL support is built statically into php, this means that on
Windows this function will be undefined in the official PHP builds. To make this function available on Windows you must compile your
own PHP binaries.
Note
ftp_ssl_connect(3) is not intended for use with sFTP. To use sFTP with PHP, please see ssh2_sftp(3).
PARAMETERS
o $host
- The FTP server address. This parameter shouldn't have any trailing slashes and shouldn't be prefixed with ftp://.
o $port
- This parameter specifies an alternate port to connect to. If it is omitted or set to zero, then the default FTP port, 21, will
be used.
o $timeout
- This parameter specifies the timeout for all subsequent network operations. If omitted, the default value is 90 seconds. The
timeout can be changed and queried at any time with ftp_set_option(3) and ftp_get_option(3).
RETURN VALUES
Returns a SSL-FTP stream on success or FALSE on error.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.2.2 | |
| | |
| | The function was changed to return FALSE when it |
| | can't use an SSL connection, instead of fallback- |
| | ing to a non-SSL one as previously. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
ftp_ssl_connect(3) example
<?php
// set up basic ssl connection
$conn_id = ftp_ssl_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
echo ftp_pwd($conn_id); // /
// close the ssl connection
ftp_close($conn_id);
?>
SEE ALSO
ftp_connect(3).
PHP Documentation Group FTP_SSL_CONNECT(3)