PHP function inet_pton()

Availability in versions: PHP 5.1.0

Converts a human readable IP address to its packed in_addr representation

Parameters

Parameter Data type Default value Note
$address string not A human readable IPv4 or IPv6 address.

Return values

string

the in_addr representation of the given address

Other resources

Official inet-pton documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.