PHP Classes
elePHPant
Icontem

PHP IP Sorter: Sort an array of IP addresses

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-09-10 (4 years ago) RSS 2.0 feedStarStar 34%Total: 295 All time: 7,272 This week: 353Up
Version License PHP version Categories
sorterip 1.0GNU General Publi...3.0Networking, Algorithms, PHP 5
Description Author

This class can sort an array of IP addresses.

It takes a list of IP v4 addresses and sorts them considering the numbers of its parts separated by dots starting from the first part number.

The class returns the same array with the address elements already sorted.

The sorting algorithm may be overridden providing a callback function to implement a different algorithm.

Innovation Award
PHP Programming Innovation award nominee
September 2014
Number 5


Prize: One downloadable copy of Komodo IDE
Some applications need to group IP addresses according to the networks they belong.

One solution for this problem is to sort the list of IP addresses, so addresses of the same network appear in the list together.

This class can sort a list of IP addresses considering the values of each part of the whole IP address.

Manuel Lemos
  Performance   Level  
Name: Luca Pacchiarotta is available for providing paid consulting. Contact Luca Pacchiarotta .
Classes: 1 package by
Country: Italy Italy
Age: ???
All time rank: 3718152 in Italy Italy
Week rank: 700 Up27 in Italy Italy Up
Innovation award
Innovation award
Nominee: 1x

Details
 +-------------------------------------+
 |     Sorter IP | v 1.0               |
 +-------------------------------------+



Sorter IP
  It's a PHP class to sort a list of IP addresses.

Luca Pacchiarotta
luca450mhz at inwind dot it
  Files folder image Files  
File Role Description
Accessible without login Plain text file demo.php Example A demo script
Accessible without login Plain text file license.txt Lic. License
Accessible without login Plain text file readme.txt Data Readme
Plain text file SorterIP.php Class The primary class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:295
This week:0
All time:7,272
This week:353Up
User Ratings User Comments (1)
 All time
Utility:41%StarStarStar
Consistency:50%StarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:34%StarStar
Rank:3187
 
$tmp1 = explode('.
4 years ago (Dima Zan)
5%Star