Change language

PHP Inet_ntop () Function

Syntax:
string inet_ntop (string $ip_address)
Parameter:This function takes one parameter as above and described below:
  • $ip_address:Required. It specifies a 32-bit IPv4 or 128-bit IPv6 address.
Return Value:This function returns a string-formatted readable address on success or FALSE in in case of error.Note.This function is available in PHP 5.1.0 and later.The following programs illustrate the inet_ntop() function in PHP: Program 1:  
// Save the address to a variable $addr = chr (127). chr (0). chr (1). chr (1);  
// Use the inet_ntop() function to convert
// Human readable web address
// submission $exp = inet_ntop ( $addr );  
// Show result echo $exp ;  
?>
Exit:
127.0.1.1
Program 2:This program uses a 4-character ascii string directly in the parameter.  
// Use the inet_ntop() function to convert
// Human readable web address
// presentation echo inet_ntop ( "[] []" ). "
"
; echo inet_ntop ( "4509" ). "
"
; echo inet_ntop ( "* ^ b @ " ). "
"
; echo inet_ntop ( "hqp0" ). "
"
; echo inet_ntop ( "2c #! " );  
?>
Exit:
91.93.91.93 
52.53.48.57
42.94.98.64
104.113.112.48
50.99.35.33
Link: https://www.php.net/manual/en/function.inet-ntop.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method