Project

General

Profile

$iptype » History » Version 2

Per Amundsen, 08/12/2015 12:54 PM

1 1 Per Amundsen
_Added in 1.9.3_
2
3
*$iptype(text)*
4
5
Returns "ipv4" or "ipv6" if text is is a valid IP address format.
6
7
*Parameters*
8
9
text - The text to validate.
10
11
*Properties*
12
13 2 Per Amundsen
-expand - Expand a ipv6 address.
14
.compress - Compress a ipv6 address.
15 1 Per Amundsen
16
*Example*
17
18
<pre>
19
; Check a IPv4 address.
20
//echo -ag 8.8.8.8 is $iptype(8.8.8.8)
21
22
; Check a IPv6 address.
23
//echo -ag FE80:0000:0000:0000:0202:B3FF:FE1E:8329 is $iptype(FE80:0000:0000:0000:0202:B3FF:FE1E:8329)
24
</pre>