[ create a new paste ] login | about

Link: http://codepad.org/nogeLPtq    [ raw code | output | fork ]

PHP, pasted on Aug 20:
1
2
3
4
5
6
7
8
9
10
11
12
<?php
	$ipPacked = '75f1382f';
	
	$ipSegments = array();
	for ($i = 0; $i < 8; $i += 2) {
		$ipSegments[] = hexdec($ipPacked[$i] . $ipPacked[$i + 1]);
	}
	
	$ipReal = implode('.', $ipSegments);
	
	var_dump($ipReal);
?>


Output:
1
string(13) "117.241.56.47"


Create a new paste based on this one


Comments: