how to encode ip address in mysql database with php
RegisterLogin
how to encode ip address in mysql database with php
Post Description: how to encode ip address in mysql database with php
Tags: how, to, encode, ip, address, in, mysql, database, with, php
This Post Was Posted On Feb 29, 2008 By web hosting #1889
Post Description: how to encode ip address in mysql database with php
Tags: how, to, encode, ip, address, in, mysql, database, with, php
This Post Was Posted On Feb 29, 2008 By web hosting #1889
how to encode ip address in mysql database with php by web hosting
here and example:
CODE:
function encode_ip($dotquad_ip){
$ip_sep = explode('.', $dotquad_ip);
return sprintf('%02x%02x%02x%02x', $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]);
}
function decode_ip($int_ip){
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
} Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
tacal
#2124 1
very good information
Aug 02, 2007 Reply Report abuse
©2011 Webune Forums - Wed Dec 21, 2011 2:03 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3