Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
/ netv6 Public archive

A PHP-Extension for gethostbyname and gethostbynamel with IPv6

Notifications You must be signed in to change notification settings

delassiter/netv6

Repository files navigation

netv6

A PHP extension that provides access to getaddrinfo.

This extensions offers a Class by the name of "NetV6" with two static methods

  • getHostByName($hostname, $protocol)
  • getHostByNameL($hostname, $protocol)

For $protocol you may use

  • NetV6::IPV4
  • NetV6::IPV6
  • NetV6::DUAL

On error during lookup a NetV6Exception will be thrown with Message and Code (according to getaddrinfo)

For getHostByName NetV6::DUAL will get IPv6 and if not available IPv4 (or error) For getHostByNameL NetV6::DUAL will get both IPv6 and IPv4

To Do

  • refactor (!!!) So many duplicates...
  • tests

Installation

Requirements: php5, php5-dev, *nix os, pear & pecl

  1. phpize .
  2. ./configure
  3. make
  4. make install
  5. Add extension to php

About

A PHP-Extension for gethostbyname and gethostbynamel with IPv6

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages