All Projects β†’ darsyn β†’ ip

darsyn / ip

Licence: MIT license
Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to ip

Aggregator
A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.
Stars: ✭ 19 (-91.04%)
Mutual labels:  ipv6, ipv4, ip, cidr
IPpy
πŸš€ Ping IP addresses and domains in parallel to find the accessible and inaccessible ones.
Stars: ✭ 54 (-74.53%)
Mutual labels:  ipv6, ipv4, ip-address, ip
private-ip
Check if IP address is private.
Stars: ✭ 26 (-87.74%)
Mutual labels:  ipv6, ipv4, ip-address, ip
Geolocate-IP-Browser-Extension
A browser extension, which shows you the origin of your IP address.
Stars: ✭ 21 (-90.09%)
Mutual labels:  ipv6, ipv4, ip-address, ip
PHP-IPAddress
IP Address utility classes for PHP
Stars: ✭ 63 (-70.28%)
Mutual labels:  ipv6, ipv4, ip-address
go-external-ip
a Golang library to get your external ip from multiple services
Stars: ✭ 55 (-74.06%)
Mutual labels:  ipv6, ipv4, ip
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (-84.43%)
Mutual labels:  ipv6, ipv4, ip-address
zx-ip-address
Deprecated
Stars: ✭ 96 (-54.72%)
Mutual labels:  packagist, ipv6, ipv4
Iptools
PHP Library for manipulating network addresses (IPv4 and IPv6)
Stars: ✭ 163 (-23.11%)
Mutual labels:  ipv6, ipv4, ip
node-ip2region
IP/IPv6 to region on Node.js (IP/IPv6 εœ°ε€εˆ°εŒΊεŸŸθΏθ₯商)
Stars: ✭ 95 (-55.19%)
Mutual labels:  ipv6, ip-address, ip
python-iptools
A few useful functions and objects for manipulating ip addresses in python.
Stars: ✭ 68 (-67.92%)
Mutual labels:  ipv6, ipv4, cidr
ipapi-python
Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup
Stars: ✭ 42 (-80.19%)
Mutual labels:  ipv6, ipv4, ip-address
server-ip-addresses
Daily updated list of IP addresses / CIDR blocks used by data centers, cloud service providers, servers, etc.
Stars: ✭ 74 (-65.09%)
Mutual labels:  ip-address, ip, cidr
ipaddress
Data analysis of IP addresses and networks
Stars: ✭ 20 (-90.57%)
Mutual labels:  ipv6, ipv4, ip-address
IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (-82.55%)
Mutual labels:  ipv6, ipv4, ip-address
Ipaddress
Java library for handling IP addresses and subnets, both IPv4 and IPv6
Stars: ✭ 197 (-7.08%)
Mutual labels:  ipv6, ipv4, ip-address
captcp
A open source program for TCP analysis of PCAP files
Stars: ✭ 110 (-48.11%)
Mutual labels:  ipv6, ipv4, ip
Ip Num
A TypeScript/JavaScript library for working with ASN, IPv4, and IPv6 numbers. It provides representations of these internet protocol numbers with the ability to perform various IP related operations like parsing, validating etc. on them
Stars: ✭ 113 (-46.7%)
Mutual labels:  ipv6, ipv4, ip-address
Php Ip Tools
Useful tools for IP manipulations
Stars: ✭ 152 (-28.3%)
Mutual labels:  ipv6, ipv4, ip
php-ip-anonymizer
IP address anonymizer library for PHP
Stars: ✭ 55 (-74.06%)
Mutual labels:  ipv6, ipv4, ip-address

IP is an immutable value object for (both version 4 and 6) IP addresses. Several helper methods are provided for ranges, broadcast and network addresses, subnet masks, whether an IP is a certain type (defined by RFC's), etc.

This project aims for simplicity of use and any contribution towards that goal - whether a bug report, modifications to the codebase, or an improvement to the accuracy or readability of the documentation - are always welcome.

Documentation

Full documentation is available in the docs/ folder.

Code of Conduct

This project includes and adheres to the Contributor Covenant as a Code of Conduct.

Upgrading

This library is fairly similar to how it was in 3.3.1; the main differences are:

Brief Example

<?php

use Darsyn\IP\Exception;
use Darsyn\IP\Version\IPv4;

try {
    $ip = IPv4::factory('192.168.0.1');
} catch (Exception\InvalidIpAddressException $e) {
    exit('The IP address supplied is invalid!');
}

$companyNetwork = IPv4::factory('216.58.198.174');
if (!$ip->inRange($companyNetwork, 25)) {
    throw new \Exception('Request not from a known company IP address.');
}

// Is it coming from the local network?
if (!$ip->isPrivateUse()) {
    record_visit($ip->getBinary(), $_SERVER['HTTP_USER_AGENT']);
}

License

Please see the separate license file included in this repository for a full copy of the MIT license, which this project is licensed under.

Authors

If you make a contribution (submit a pull request), don't forget to add your name here!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].