$IPARR= Explode ('.',$_server[' REMOTE_ADDR ']);$ipVal=$IPARR[0] *0x1000000+$IPARR[1] *0x10000+$IPARR[2] *0x100+$IPARR[3] ;Echo$ipVal.'
';$IPARR=Array(0= Floor ($ipVal/0x1000000) );$ipVint=$ipVal-($IPARR[0]*0x1000000);//For clarity$IPARR[1] = ($ipVint&0xFF0000) >> -;$IPARR[2] = ($ipVint&0xff00) >>8;$IPARR[3] =$ipVint&0xFF;$ipDotted= Implode ('.',$IPARR);Echo$ipDotted;
$ipArr = explode ('. ',$_server[' REMOTE_ADDR ']); $ip = $ipArr[0] * 0x1000000 + $ipArr[1] * 0x10000 + $ipArr[2] * 0x100 + $ipArr[3] ; ?> This can is written in a bit more efficient-to:
$ipArr = explode ('. ',$_server[' remote_addr '); $ip = $ipArr[0]<< + $ipArr[1]&L t;< + $ipArr[2] <<8 + $IPARR[ 3]; ?>shift is more cheaper.
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the PHP IP address conversion Integer, integer conversion address, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.