Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mailparse_rfc822_parse_addresses(3) [php man page]

MAILPARSE_RFC822_PARSE_ADDRESSES(3)					 1				       MAILPARSE_RFC822_PARSE_ADDRESSES(3)

mailparse_rfc822_parse_addresses - Parse RFC 822 compliant addresses

SYNOPSIS
array mailparse_rfc822_parse_addresses (string $addresses) DESCRIPTION
Parses a RFC 822 compliant recipient list, such as that found in the To: header. PARAMETERS
o $addresses - A string containing addresses, like in: Wez Furlong <wez@example.com>, doe@example.com Note This string must not include the header name. RETURN VALUES
Returns an array of associative arrays with the following keys for each recipient: +---------+---------------------------------------------------+ | | | |display | | | | | | | The recipient name, for display purpose. If this | | | part is not set for a recipient, this key will | | | hold the same value as address. | | | | | | | |address | | | | | | | The email address | | | | | | | |is_group | | | | | | | | | | TRUE if the recipient is a newsgroup, FALSE oth- | | | erwise. | | | | +---------+---------------------------------------------------+ EXAMPLES
Example #1 mailparse_rfc822_parse_addresses(3) example <?php $to = 'Wez Furlong <wez@example.com>, doe@example.com'; var_dump(mailparse_rfc822_parse_addresses($to)); ?> The above example will output: array(2) { [0]=> array(3) { ["display"]=> string(11) "Wez Furlong" ["address"]=> string(15) "wez@example.com" ["is_group"]=> bool(false) } [1]=> array(3) { ["display"]=> string(15) "doe@example.com" ["address"]=> string(15) "doe@example.com" ["is_group"]=> bool(false) } } PHP Documentation Group MAILPARSE_RFC822_PARSE_ADDRESSES(3)

Check Out this Related Man Page

GEOIP_DB_GET_ALL_INFO(3)						 1						  GEOIP_DB_GET_ALL_INFO(3)

geoip_db_get_all_info - Returns detailed information about all GeoIP database types

SYNOPSIS
array geoip_db_get_all_info (void ) DESCRIPTION
The geoip_db_get_all_info(3) function will return detailed information as a multi-dimensional array about all the GeoIP database types. This function is available even if no databases are installed. It will simply list them as non-available. The names of the different keys of the returning associative array are as follows: o "available" -- Boolean, indicate if DB is available (see geoip_db_avail(3)) o "description" -- The database description o "filename" -- The database filename on disk (see geoip_db_filename(3)) RETURN VALUES
Returns the associative array. EXAMPLES
Example #1 A geoip_db_get_all_info(3) example This will print the array containing all the information. <?php $infos = geoip_db_get_all_info(); if (is_array($infos)) { var_dump($infos); } ?> The above example will output: array(11) { [1]=> array(3) { ["available"]=> bool(true) ["description"]=> string(21) "GeoIP Country Edition" ["filename"]=> string(32) "/usr/share/GeoIP/GeoIP.dat" } [ ... ] [11]=> array(3) { ["available"]=> bool(false) ["description"]=> string(25) "GeoIP Domain Name Edition" ["filename"]=> string(38) "/usr/share/GeoIP/GeoIPDomain.dat" } } Example #2 A geoip_db_get_all_info(3) example You can use the various constants as keys to get only parts of the information. <?php $infos = geoip_db_get_all_info(); if ($infos[GEOIP_COUNTRY_EDITION]['available']) { echo $infos[GEOIP_COUNTRY_EDITION]['description']; } ?> The above example will output: GeoIP Country Edition PHP Documentation Group GEOIP_DB_GET_ALL_INFO(3)
Man Page