gehe zur Dokumentation dieser Datei
83 if (substr_count($ip,
'::') === 1)
85 list($ip1, $ip2) = explode(
'::', $ip);
92 $c1 = substr_count($ip1,
':');
100 $c2 = substr_count($ip2,
':');
102 if (strpos($ip2,
'.') !==
false)
107 if ($c1 === -1 && $c2 === -1)
109 $ip =
'0:0:0:0:0:0:0:0';
114 $fill = str_repeat(
'0:', 7 - $c2);
115 $ip = str_replace(
'::', $fill, $ip);
120 $fill = str_repeat(
':0', 7 - $c1);
121 $ip = str_replace(
'::', $fill, $ip);
126 $fill =
':' . str_repeat(
'0:', 6 - $c2 - $c1);
127 $ip = str_replace(
'::', $fill, $ip);
150 $ip = self::uncompress($ip);
151 $ip_parts = self::split_v6_v4($ip);
154 $ip_parts[0] = preg_replace(
'/(^|:)0+([0-9])/',
'\1\2', $ip_parts[0]);
157 if (preg_match_all(
'/(?:^|:)(?:0(?::|$))+/', $ip_parts[0], $matches, PREG_OFFSET_CAPTURE))
161 foreach ($matches[0] as $match)
163 if (strlen($match[0]) > $max)
165 $max = strlen($match[0]);
170 $ip_parts[0] = substr_replace($ip_parts[0],
'::', $pos, $max);
173 if ($ip_parts[1] !==
'')
175 return implode(
':', $ip_parts);
197 if (strpos($ip,
'.') !==
false)
199 $pos = strrpos($ip,
':');
200 $ipv6_part = substr($ip, 0, $pos);
201 $ipv4_part = substr($ip, $pos + 1);
202 return array($ipv6_part, $ipv4_part);
206 return array($ip,
'');
220 $ip = self::uncompress($ip);
221 list($ipv6, $ipv4) = self::split_v6_v4($ip);
222 $ipv6 = explode(
':', $ipv6);
223 $ipv4 = explode(
'.', $ipv4);
224 if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4)
226 foreach ($ipv6 as $ipv6_part)
229 if ($ipv6_part ===
'')
233 if (strlen($ipv6_part) > 4)
237 $ipv6_part = ltrim($ipv6_part,
'0');
238 if ($ipv6_part ===
'')
242 $value = hexdec($ipv6_part);
243 if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF)
246 if (count($ipv4) === 4)
248 foreach ($ipv4 as $ipv4_part)
250 $value = (int) $ipv4_part;
251 if ((
string) $value !== $ipv4_part || $value < 0 || $value > 0xFF)
274 return self::check_ipv6($ip);
Sie sind hier: Home » MyOOS Benutzerhandbuch » SimplePie
Korrekturen, Hinweise und Ergänzungen
Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag
Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.