Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
domainepublic
alternc
Commits
aa9acaa1
Commit
aa9acaa1
authored
Mar 27, 2014
by
alban
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] serveurList on m_dom.php
parent
6fc53c04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
bureau/class/m_dom.php
bureau/class/m_dom.php
+10
-9
No files found.
bureau/class/m_dom.php
View file @
aa9acaa1
...
...
@@ -936,6 +936,7 @@ class m_dom {
$egal
=
"domain = "
;
break
;
}
$serveurList
=
array
();
// pour ajouter un nouveau TLD, utiliser le code ci-dessous.
// echo "serveur : $serveur <br />";
if
((
$fp
=
@
fsockopen
(
$serveur
,
43
))
>
0
)
{
...
...
@@ -958,7 +959,7 @@ class m_dom {
$found
=
true
;
$tmp
=
strtolower
(
str_replace
(
chr
(
10
),
""
,
str_replace
(
chr
(
13
),
""
,
str_replace
(
" "
,
""
,
str_replace
(
"Name Server:"
,
""
,
$ligne
)))));
if
(
$tmp
)
$serve
r
[]
=
$tmp
;
$serve
urList
[]
=
$tmp
;
}
break
;
case
"cx"
:
...
...
@@ -966,7 +967,7 @@ class m_dom {
if
(
$ligne
==
""
&&
$state
==
1
)
$state
=
2
;
if
(
$state
==
1
)
$serve
r
[]
=
strtolower
(
$ligne
);
$serve
urList
[]
=
strtolower
(
$ligne
);
if
(
$ligne
==
"Nameservers:"
&&
$state
==
0
)
{
$state
=
1
;
$found
=
true
;
...
...
@@ -978,7 +979,7 @@ class m_dom {
if
(
$found
)
$tmp
=
trim
(
$ligne
);
if
(
$tmp
)
$serve
r
[]
=
$tmp
;
$serve
urList
[]
=
$tmp
;
if
(
$ligne
==
"Nameservers:"
)
{
$state
=
1
;
$found
=
true
;
...
...
@@ -991,7 +992,7 @@ class m_dom {
$tmp
=
strtolower
(
preg_replace
(
'/Name Server: ([^ ]+)\..$/'
,
"
\\
1"
,
$ligne
));
$tmp
=
preg_replace
(
'/[^-_a-z0-9\.]/'
,
''
,
$tmp
);
if
(
$tmp
)
$serve
r
[]
=
$tmp
;
$serve
urList
[]
=
$tmp
;
}
break
;
case
"it"
:
...
...
@@ -999,7 +1000,7 @@ class m_dom {
$found
=
true
;
$tmp
=
strtolower
(
preg_replace
(
"/nserver:\s*[^ ]*\s*([^\s]*)$/"
,
"
\\
1"
,
$ligne
));
if
(
$tmp
)
$serve
r
[]
=
$tmp
;
$serve
urList
[]
=
$tmp
;
}
break
;
case
"fr"
:
...
...
@@ -1008,7 +1009,7 @@ class m_dom {
$found
=
true
;
$tmp
=
strtolower
(
preg_replace
(
"#nserver:\s*([^\s]*)\s*.*$#"
,
"
\\
1"
,
$ligne
));
if
(
$tmp
)
$serve
r
[]
=
$tmp
;
$serve
urList
[]
=
$tmp
;
}
break
;
case
"ca"
:
...
...
@@ -1020,14 +1021,14 @@ class m_dom {
if
(
preg_match
(
'#^[^%]#'
,
$ligne
)
&&
$ligne
=
preg_replace
(
'#[[:space:]]#'
,
""
,
$ligne
))
{
// first non-whitespace line is considered to be the nameservers themselves
$found
=
true
;
$serve
r
[]
=
$ligne
;
$serve
urList
[]
=
$ligne
;
}
}
break
;
case
"coop"
:
if
(
preg_match
(
'#Host Name:\s*([^\s]+)#'
,
$ligne
,
$matches
))
{
$found
=
true
;
$serve
r
[]
=
$matches
[
1
];
$serve
urList
[]
=
$matches
[
1
];
}
}
// switch
}
// while
...
...
@@ -1038,7 +1039,7 @@ class m_dom {
}
if
(
$found
)
{
return
$serve
r
;
return
$serve
urList
;
}
else
{
$err
->
raise
(
"dom"
,
_
(
"The domain cannot be found in the Whois database"
));
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment