Network I/O

The network I/O functions send information directly over the Internet Protocol, or they fetch information about Internet hosts.

boolean checkdnsrr(string host, string type)

The checkdnsrr function checks DNS records for a host. The type argument defines the type of records for which to search. Valid types are listed in Table 8.16.

If type is not specified, checkdnsrr checks for MX records. You may wish to read the man page for named, the Internet domain name server daemon.

<?
  if(checkdnsrr("clearink.com", "MX"))
  {
     print("clearink.com is a mail exchanger");
  }
?>

integer fsockopen(string hostname, integer port, integer error_number, string error_description, double timeout)

The fsockopen begins a network connection as a file stream, ...

Get Core PHP Programming: Using PHP to Build Dynamic Web Sites now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.