Storeip: Store ip-addresses in a database

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 1,469 All time: 2,646 This week: 312Up
Version License Categories
storeip 1.0GNU General Publi...Networking, Databases
Description Author

To Store ip-addresses in a database, you will
need a field type of Char(15).
This class let's you store the ipnumbers as
an integer ( between -2139062144 and 2139062143)

This class has two functions
1) decode ip->number
2) encode number->ip

Both functions return false for empty or wrong ip-numbers

While using this class you will spare typical 11 bytes
for every ipnumber you store.
Char(15) needs 15 Bytes
SIGNED INT(10) needs 4 Bytes

Picture of Bas Jobsen
Name: Bas Jobsen <contact>
Classes: 9 packages by
Country: The Netherlands The Netherlands
Age: 44
All time rank: 2538 in The Netherlands The Netherlands
Week rank: 517 Down16 in The Netherlands The Netherlands Down

 

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example
Accessible without login Plain text file license.txt Lic. license
Accessible without login Plain text file php_and_mysql.txt Doc. IMPORTANT
Plain text file storeip.php Class Storeip

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,469
This week:0
All time:2,646
This week:312Up

For more information send a message to info at phpclasses dot org.