[PHP] Utility Function 6 page _php tutorial

Source: Internet
Author: User
Tags ftp connection remote ftp server urlencode
Send an e-mail to the specified email address to,subject represents the subject, and the message is the content of the letter. Additional options additional_headers can be omitted, indicating the header of other mail documents

BOOL Mail (string to,string subject,string message,string [additional--headers]
The URL string is parsed and the result is returned in the array. The returned array includes the following elements: scheme, host, port, path, query and fragment, etc.

Array parse_url (string url)
Encodes a string as a URL, for example a space becomes a plus sign. form data transfer in Web pages is encoded with UrlEncode and sent out

String UrlEncode (String str)
To restore a URL-encoded string

String UrlDecode (String str)
You can open the link to the FTP server. The parameter host is the URL of the FTP server. Parameter port is usually omitted, if the FTP server port number (port) is not 21 o'clock need to add this parameter. Return the connection code if there is no error and return FALSE if it fails

int Ftp_connect (string host,int [port])
FTP server that can log in to the link. The parameters Ftp_stream and password are the user account and password of the FTP server, usually anonymous the public account, and the password is an e-mail address. Returns true if successful

BOOL Ftp_login (int ftp_stream,string username,string password)
Used to obtain the current path in the FTP server. The Ftp_stream parameter is the FTP connection code. Returns NULL if there is an error

String ftp_pwd (int ftp_stream)
Used to go back to the upper directory, which is the parent directory of the current directory. The parameter ftp_stream is the FTP connection code. Returns true if successful

Boolean ftp_cdup (int ftp_stream)
Used to go to the next level of directory. The Ftp_stream parameter is the FTP connection code. The parameter directory is the directory you want to go to. Success returns TRUE, Failure returns false

BOOL Ftp_chdir (int ftp_stream,string directory)
Returns the file name or array for the given directory

Array ftp_nlist (int ftp_stream,string directory)
Returns a detailed list of a directory in the same way as an array of output rows

Array ftp_rawlist (int ftp_stream,string directory)
A system that can display the remote FTP server, which is equal to the FTP server under the systems or syst instructions. Successful returns a string, such as "215 UNIX Type:l8", which fails to return false

String Ftp_systype (int ftp_stream)
Used to download the specified file. The parameter ftp_stream is the connection code of the FTP, the parameter local_file is the file name that wants to exist on the local side, the parameter remote_file is the file name to download, the value of the parameter mode is FTP_ASCII and Ftp_binary two, respectively, it represents the text file or binary file, success returns TRUE, Failure returns false

BOOL Ftp_get (int ftp_stream,string local_file,string remote_file,int mode)
The file is downloaded and exists in a local file that is already open. Parameter FP is a file pointer to an open file on the local side

BOOL Ftp_fget (int ftp_stream,int fp,string remote_file,int mode)
Used to upload the specified file. The parameter ftp_stream is the connection code of the FTP, the parameter remote_file is the file name of the remote, the parameter local_file is the file name to be uploaded, the value of the parameter mode is FTP_ASCII and ftp_binary two kinds

BOOL Ftp_put (int ftp_stream,string remote_file,string local_file,int mode)
Sends a CMD command to the FTP host, which is not standardized, but is related to the server's host operating system, which can be used for file access permissions, group member operations

BOOL Ftp_site (Resource ftp_stream,string cmd)
Close FTP Connection

BOOL Ftp_quit (int ftp_stream)
A host domain name that can be passed back to an IP address. If execution fails, the original IP URL is returned

String gethostbyaddr (String ip_address)
The IP address of a network host can be passed back. If the execution fails, the original computer domain name is returned hostname

String gethostbyname (string hostname)
Returns a list of IP addresses for a given host

Array Gethostbynamel (string hostname)
Checks whether a given Internet host name or IP address has a DNS record, type can be a, MX, NS, SOA, TPR, CNAME, or any, the default type is MX

int CHECKDNSRR (string host [, StringType])
Obtain MX records corresponding to the given Internet host name

http://www.bkjia.com/PHPjc/318602.html www.bkjia.com true http://www.bkjia.com/PHPjc/318602.html techarticle //Send e-mail to the specified email address to,subject represents the subject, and the message is the content of the letter. Additional options additional_headers can be omitted, indicating other mail document Header Boolmail (...

  • Related Article

    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.