Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How php converts ip with range into integer range
How php converts ip with range into integer range
& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)

$ip? =? $_SERVER[ "remote _ addr"]; ? //? Get client IP

$longip? =? IP 2 long($ IP);

//? Programmers usually put it? IP? Convert it into a shape and write it into a database.

//? Convert to standard when reading? IP? address

$ip? =? long 2 IP($ longip);

Echo? & ltpre & gt';

print_r(array($longip? = & gt? $ IP));

& gt