Thanks for visiting Daily Cup of Tech!
Here are a few things that you may want to do while you are visiting:
- Subscribe to the RSS feed
- Take a theme tour and check out some of the best DCoT posts
- Check out our latest posts
If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?
| Trackback link - http://www.DailyCupOfTech.com/converting-ip-address-formats/trackback/ |
|

February 6th, 2007 at 11:30 am
It’s not unusual to store IP addresses in a database using a network long. First, it’s space efficient. Second, an integer format allows you to easily (and inexpensively) query for IPs which fall into a given subnet or address range. Doing this with DDN (dotted decimal notation) formatted columns is far more difficult.
A DllCall to wsock32.dll’s inet_ntoa() function will simplify your code (even eliminate the intermediate dec2hex conversion). This DLL has additional similar functions for address manipulation.
February 9th, 2007 at 1:56 pm
Or you can use the following php function
function address2number($ip){
$retVal = false;
list($a,$b,$c,$d) = explode('.', $ip);
if(is_int($a) && is_int($b) && is_int($c) && is_int($d)){
$retVal = ($a
I use this code on my website: Ip global positioning . I have also google maps API to show the exact location.
March 28th, 2007 at 5:18 pm
35 Web Based Application Alternatives 9 Ways To Think Outside The Box About Daily Cup of Tech AutoIt UDF’s; A Lot of Power in One Line Build a USB Drive Mail System Configure Autoplay With TweakUI Configuring Disks in FreeNAS Converting IP Address Formats Create a Self-Burning ISO with AutoIt Creating a Basic TrueCrypt Volume on a USB Drive Creating Windows Shares on FreeNAS DCoT Discounts DCoT Webmaster Tools Disable IE7 Installation Via Windows Update