Php Networking Functions

There are many functions in php to convert or look up domain name, IP address,
protocol, and service information.

Domain name/IP address lookups and conversions

  • gethostbynamel()
  • gethostbyname()
  • gethostbyaddr()
  • ip2long()
  • long2ip()
 Sockets


  • fsockopen()
  • pfsockopen()
  • socket_get_status()
  • socket_set_blocking()
  • socket_set_timeout()

    DNS resource records

    • checkdnsrr()
    • getmxrr()