O'Reilly logo

Core PHP Programming: Using PHP to Build Dynamic Web Sites by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required