Giter Site home page Giter Site logo

v6tools's Introduction

PHP IPv6 Tools

Build Status "Flattr This"

PHP IPv6 Tools (v6tools) is a small library that provides validation of IPv6 addresses, subnets and EUI64.

<?php
require('v6tools/autoload.php');

if (!v6tools\Runtime::isIPv6Supported()) {
    fprintf(STDERR, "No ipv6 support");
    exit(-1);
}

$ip = new v6tools\EUI64('2a01:198:603:0:224:d6ff:fe18:618c');
echo $ip->getMacAddress();
// echos 00:24:d6:18:61:8c

$ip = new v6tools\Subnet('2001::/16');
$ip->isInSubnet('2001::1');
// returns true
$ip->isInSubnet('2000::1');
// return false

License

Licensed under the terms of the MIT License with additional Beerware clause. If you like v6tools feel free to buy me beer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.