Remove usage of each() (obsolete since PHP 7.2)
This commit is contained in:
parent
f55ba784c8
commit
4a1eb26eaa
10 changed files with 612 additions and 622 deletions
|
@ -61,7 +61,7 @@ class at_handler
|
|||
|
||||
if (isset($reg['domain']['descr']))
|
||||
{
|
||||
while (list($key, $val) = each($reg['domain']['descr']))
|
||||
foreach ($reg['domain']['descr'] as $key => $val)
|
||||
{
|
||||
$v = trim(substr(strstr($val, ':'), 1));
|
||||
if (strstr($val, '[organization]:'))
|
||||
|
@ -99,4 +99,3 @@ class at_handler
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
1189
src/whois.client.php
1189
src/whois.client.php
File diff suppressed because it is too large
Load diff
|
@ -48,7 +48,7 @@ class fastdomain_handler
|
|||
'domain.status' => 'Status:'
|
||||
);
|
||||
|
||||
while (list($key, $val) = each($data_str))
|
||||
foreach ($data_str as $key => $val)
|
||||
{
|
||||
$faststr = strpos($val, ' (FAST-');
|
||||
if ($faststr)
|
||||
|
@ -75,4 +75,3 @@ class fastdomain_handler
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -65,7 +65,7 @@ array_splice($data_str['rawdata'],18,1);
|
|||
|
||||
if (isset($reg['domain']['descr:']))
|
||||
{
|
||||
while (list($key, $val) = each($reg['domain']['descr:']))
|
||||
foreach ($reg['domain']['descr:'] as $key => $val)
|
||||
{
|
||||
$v = trim(substr(strstr($val, ':'), 1));
|
||||
if (strstr($val, '[organization]:'))
|
||||
|
@ -103,4 +103,3 @@ array_splice($data_str['rawdata'],18,1);
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -60,7 +60,7 @@ class afrinic_handler
|
|||
}
|
||||
|
||||
if (isset($r['owner']['remarks']) && is_array($r['owner']['remarks']))
|
||||
while (list($key, $val) = each($r['owner']['remarks']))
|
||||
foreach ($r['owner']['remarks'] as $key => $val)
|
||||
{
|
||||
$pos = strpos($val,'rwhois://');
|
||||
|
||||
|
@ -74,4 +74,3 @@ class afrinic_handler
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -74,7 +74,7 @@ class apnic_handler
|
|||
|
||||
$r['registered'] = 'yes';
|
||||
|
||||
while (list($key,$val) = each($contacts))
|
||||
foreach ($contacts as $key => $val)
|
||||
if (isset($rb[$key]))
|
||||
{
|
||||
if (is_array($rb[$key]))
|
||||
|
@ -120,4 +120,3 @@ class apnic_handler
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -43,7 +43,7 @@ class nu_handler
|
|||
'handle' => 'Record ID:'
|
||||
);
|
||||
|
||||
while (list($key, $val) = each($data_str['rawdata']))
|
||||
foreach ($data_str['rawdata'] as $key => $val)
|
||||
{
|
||||
$val = trim($val);
|
||||
|
||||
|
@ -51,7 +51,7 @@ class nu_handler
|
|||
{
|
||||
if ($val == 'Domain servers in listed order:')
|
||||
{
|
||||
while (list($key, $val) = each($data_str['rawdata']))
|
||||
foreach ($data_str['rawdata'] as $key => $val)
|
||||
{
|
||||
$val = trim($val);
|
||||
if ($val == '')
|
||||
|
@ -63,7 +63,7 @@ class nu_handler
|
|||
|
||||
reset($items);
|
||||
|
||||
while (list($field, $match) = each($items))
|
||||
foreach ($items as $field => $match)
|
||||
if (strstr($val, $match))
|
||||
{
|
||||
$r['regrinfo']['domain'][$field] = trim(substr($val, strlen($match)));
|
||||
|
@ -87,4 +87,3 @@ class nu_handler
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -43,7 +43,7 @@ if (empty($blocks) || !is_array($blocks['main']))
|
|||
$r = $blocks['main'];
|
||||
$ret['registered'] = 'yes';
|
||||
|
||||
while (list($key,$val) = each($contacts))
|
||||
foreach ($contacts as $key => $val)
|
||||
if (isset($r[$key]))
|
||||
{
|
||||
if (is_array($r[$key]))
|
||||
|
@ -74,7 +74,7 @@ $blocks = false;
|
|||
$gkey = 'main';
|
||||
$dend = false;
|
||||
|
||||
while (list($key,$val)=each($rawdata))
|
||||
foreach ($rawdata as $key => $val)
|
||||
{
|
||||
$val=trim($val);
|
||||
|
||||
|
@ -341,7 +341,7 @@ if (!$items)
|
|||
$r = [];
|
||||
$disok = true;
|
||||
|
||||
while (list($key,$val) = each($rawdata))
|
||||
foreach ($rawdata as $key => $val)
|
||||
{
|
||||
if (trim($val) != '')
|
||||
{
|
||||
|
@ -427,7 +427,7 @@ function get_blocks ( $rawdata, $items, $partial_match = false, $def_block = fal
|
|||
$r = array();
|
||||
$endtag = '';
|
||||
|
||||
while (list($key,$val) = each($rawdata))
|
||||
foreach ($rawdata as $key => $val)
|
||||
{
|
||||
$val = trim($val);
|
||||
if ($val == '') continue;
|
||||
|
@ -475,7 +475,7 @@ while (list($key,$val) = each($rawdata))
|
|||
|
||||
// Block found, get data ...
|
||||
|
||||
while (list($key,$val) = each($rawdata))
|
||||
foreach ($rawdata as $key => $val)
|
||||
{
|
||||
$val = trim($val);
|
||||
|
||||
|
@ -633,7 +633,7 @@ while (list($key,$val)=each($array))
|
|||
reset($items);
|
||||
$ok = false;
|
||||
|
||||
while (list($match,$field) = each($items))
|
||||
foreach ($items as $match => $field)
|
||||
{
|
||||
$pos = strpos(strtolower($val),$match);
|
||||
|
||||
|
@ -847,7 +847,7 @@ while (!$ok)
|
|||
reset($res);
|
||||
$ok = true;
|
||||
|
||||
while (list($key, $val) = each($res))
|
||||
foreach ($res as $key => $val)
|
||||
{
|
||||
if ($val == '' || $key == '') continue;
|
||||
|
||||
|
@ -884,4 +884,3 @@ else
|
|||
|
||||
return sprintf("%.4d-%02d-%02d",$res['y'],$res['m'],$res['d']);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -112,8 +112,8 @@ class utils extends Whois {
|
|||
|
||||
if (is_array($nserver))
|
||||
{
|
||||
reset($nserver);
|
||||
while (list($host, $ip) = each($nserver))
|
||||
reset($nserver);
|
||||
foreach ($nserver as $host => $ip)
|
||||
{
|
||||
$url = '<a href="'. str_replace('$0',$ip,$link)."\">$host</a>";
|
||||
$out = str_replace($host, $url, $out);
|
||||
|
@ -149,4 +149,3 @@ else
|
|||
|
||||
return '<a href="'.$url.'" target="_blank">'.$web.'</a>';
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -50,7 +50,7 @@ class zanet_handler
|
|||
|
||||
$rawdata = array();
|
||||
|
||||
while (list($key, $line) = each($data_str['rawdata']))
|
||||
foreach ($data_str['rawdata'] as $key => $line)
|
||||
{
|
||||
if (strpos($line, ' Contact ') !== false)
|
||||
{
|
||||
|
@ -87,4 +87,3 @@ class zanet_handler
|
|||
return $r;
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue