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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.