[PHP] function 6 page 1/2

Source: Internet
Author: User
Tags ftp connection remote ftp server mx record

// Send an email to the specified email address. subject indicates the subject and message indicates the mail content. The additional option additional_headers can be omitted, indicating the header of other mail documents.

Bool mail (string to, string subject, string message, string [additional -- headers]
// Parse the URL string and return the result to the array. The returned array includes the following elements: scheme, host, port, path, query, and fragment.

Array parse_url (string url)
// Encode the string with a URL. For example, a space is converted into a plus sign. In the webpage, form data transmission is encoded with urlencode before being sent.

String urlencode (string str)
// Restore the URL encoded string

String urldecode (string str)
// You can open a link to the FTP server. The host parameter is the URL of the FTP server. The port parameter is usually omitted. If the port of the FTP server is not 21, this parameter must be added. If no error exists, the connection code is returned. If the connection fails, false is returned.

Int ftp_connect (string host, int [port])
// You can log on to the FTP server. The ftp_stream and password parameters are the user account and password of the FTP server. Generally, anonymous is a public account, and the password is an email address. True is returned if the call is successful.

Bool ftp_login (int ftp_stream, string username, string password)
// Obtain the current path on the FTP server. The ftp_stream parameter is the FTP connection code. If an error exists, NULL is returned.

String ftp_pwd (int ftp_stream)
// Return to the upper directory, that is, the parent directory of the current directory. The ftp_stream parameter is the FTP connection code. True is returned if the call is successful.

Boolean ftp_cdup (int ftp_stream)
// Used to go to the next directory. The ftp_stream parameter is the FTP connection code. The directory parameter is the directory to go. Returns true if the call succeeds, and false if the call fails.

Bool ftp_chdir (int ftp_stream, string directory)
// Return the file name or array of the given directory

Array ftp_nlist (int ftp_stream, string directory)
// Return the detailed list of a directory by array of output rows

Array ftp_rawlist (int ftp_stream, string directory)
// Displays the system of the remote FTP server, that is, the system or syst command under the FTP server. Returns a string, for example, "215 UNIX Type: L8". If it fails, false is returned.

String ftp_0000ype (int ftp_stream)
// Download the specified object. The ftp_stream parameter is the FTP connection code. The local_file parameter is the name of the file to be downloaded. The remote_file parameter is the name of the file to be downloaded. The mode parameter values include FTP_ASCII and FTP_BINARY, indicates either a text file or a binary file. If the file is successful, true is returned. If the file fails, false is returned.

Bool ftp_get (int ftp_stream, string local_file, string remote_file, int mode)
// Download the file, which exists in the opened local file. The fp parameter is the file pointer of an opened file on the local end.

Bool ftp_fget (int ftp_stream, int fp, string remote_file, int mode)
// Uploads a specified object. The ftp_stream parameter is the FTP connection code. The remote_file parameter is the name of the file to be uploaded. The local_file parameter is the name of the file to be uploaded. The mode parameter values include FTP_ASCII and FTP_BINARY.

Bool ftp_put (int ftp_stream, string remote_file, string local_file, int mode)
// Send the cmd command to the FTP host. This command is not standardized, but related to the host operating system of the server. It can be used for file access permission and group member operations.

Bool ftp_site (resource ftp_stream, string cmd)
// Close the FTP connection

Bool ftp_quit (int ftp_stream)
// The host domain name that can return an IP address. If the execution fails, the original IP address is returned.

String gethostbyaddr (string ip_address)
// Return the IP address of a network host. If the execution fails, the original computer domain name hostname is returned.

String gethostbyname (string hostname)
// Returns the IP address list of the specified host.

Array gethostbynamel (string hostname)
// Check whether DNS records exist for the specified Internet host name or IP address. The type can be A, MX, NS, SOA, TPR, CNAME, or ANY. The default type is MX.

Int checkdnsrr (string host [, stringtype])
// Obtain the MX record corresponding to the specified Internet host name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.