php man page for ftp_site

Query: ftp_site

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

FTP_SITE(3)								 1							       FTP_SITE(3)

ftp_site - Sends a SITE command to the server

SYNOPSIS
bool ftp_site (resource $ftp_stream, string $command)
DESCRIPTION
ftp_site(3) sends the given SITE command to the FTP server. SITE commands are not standardized, and vary from server to server. They are useful for handling such things as file permissions and group membership.
PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $command - The SITE command. Note that this parameter isn't escaped so there may be some issues with filenames containing spaces and other characters.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 Sending a SITE command to an ftp server <?php // Connect to FTP server $conn = ftp_connect('ftp.example.com'); if (!$conn) die('Unable to connect to ftp.example.com'); // Login as "user" with password "pass" if (!ftp_login($conn, 'user', 'pass')) die('Error logging into ftp.example.com'); // Issue: "SITE CHMOD 0600 /home/user/privatefile" command to ftp server if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) { echo "Command executed successfully. "; } else { die('Command failed.'); } ?>
SEE ALSO
ftp_raw(3). PHP Documentation Group FTP_SITE(3)
Related Man Pages
mount_ftp(8) - mojave
mount_ftp(8) - osx
ftp_alloc(3) - php
ftp_fget(3) - php
ftp_site(3) - php
Similar Topics in the Unix Linux Community
ftp problem
Remote Access to FTP server not working
Doubt with ftp command
FTP issues between mainframe and UNIX
ftp var for filename with spaces