Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/1.php on line 1

Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/0.php on line 1
PHP. Руководство по PHP. 2005 (создание и продвижение сайта)
создание и продвижение сайта (вбиваю в ТОП-10, как гвозди)Настройка и сопровождение платной рекламы яндекс.директ

PHP. Руководство по PHP. 2005

inet_ntop

Пред.

След.

inet_ntop

(PHP 5)inet_ntop --

Converts a packed internet address to a human readable representation

Description

string inet_ntop (string in_addr)

This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP

was built with IPv6 support enabled) into an address family appropriate

string representation. Returns FALSE on failure.

Пример 1. inet_ntop() Example

<?php

$packed = chr(127). chr(0). chr(0). chr(1);

$expanded = inet_ntop($packed);

/* Outputs: 127.0.0.1 */

echo $expanded;

$packed = str_repeat(chr(0), 15). chr(1);

$expanded = inet_ntop($packed);

/* Outputs: ::1 */

echo $expanded;

?>

Замечание: Для Windows-платформ

эта функция не реализована.

See also long2ip(),

inet_pton(), and

ip2long().

Пред.

Начало

След.

getservbyport

Уровень выше

inet_pton

Отвечу на любые вопросы. С уважением, Дмитрий Владимирович.

Ваше письмо×
Free Web Hosting