As-tu testé l'outil donné en lien quelques posts plus haut ??? Tu as ce que tu demandes dans les résultats.sloshy a dit:Merci, c'est ce que j'avais besoin, mais je n'ai pas trouvé la commande permettant de déterminer la première indextion sur google?
<?php
// .eu .fr .com .net .org .info .biz .de .ca .me.uk .co.uk .org.uk
$theExt = array(".fr",".com",".eu",".ca",".info",".biz",".de",".org",".net");
// .eu .fr .com .net .org .info .biz .de .ca .me.uk .co.uk .org.uk
// LES NOMS DE DOMAINE
$tab = array("google","nimportekoi","wagadoodoo");
$i=0;
while ($i<=sizeof($tab))
{
$theNdd = $tab[$i];
$theNdd = escapeshellcmd($theNdd);
//on definit les case du tableau à vérifier
$caseForVerif['.net']=7;
$caseForVerif['.com']=7;
$caseForVerif['.org']=0;
$caseForVerif['.fr']=13;
$caseForVerif['.ca']=5;
$caseForVerif['.info']=0;
$caseForVerif['.biz']=1;
$caseForVerif['.de']=35;
$caseForVerif['.eu']=50;
$caseForVerif['.me.uk']=30;
$caseForVerif['.co.uk']=30;
$caseForVerif['.org.uk']=40;
//on definit les phrase à vérifier dans ces cases
$strForVerif['.com']='No match for "'.$theNdd.'.COM".';
$strForVerif['.fr']='%% No entries found in the AFNIC Database.';
$strForVerif['.net']='No match for "'.$theNdd.'.NET".';
$strForVerif['.org']='NOT FOUND';
$strForVerif['.ca']='';
$strForVerif['.info']='NOT FOUND';
$strForVerif['.biz']='';
$strForVerif['.de']='';
$strForVerif['.eu']='';
$strForVerif['.me.uk']='';
$strForVerif['.co.uk']='';
$strForVerif['.org.uk']='';
foreach($theExt as $anExt) {
$myArray="";
$anExt=escapeshellcmd($anExt);
exec('whois '.$theNdd.$anExt,$myArray,$retval);
if (!empty($theNdd))
$result.=(strtolower($myArray[$caseForVerif[$anExt]])==
strtolower($strForVerif[$anExt]))?"->> ".$theNdd.$anExt."
est libre<br/>":"->> ".$theNdd.$anExt."
est déjà réservé<br />";
// print_r("$myArray");
}
$i++;
}
echo '<h3>'.str_replace('\\','',$result).'</h3>';
?>
<?php
$theNdd = "phpsources"; // nom du domaine
$theNdd = escapeshellcmd($theNdd);
$myArray="";
$anExt=".net";
$anExt=escapeshellcmd($anExt);
exec('whois '.$theNdd.$anExt,$myArray,$retval);
while ($i<=sizeof($myArray)) {
if (preg_match('#Expiration\sDate:(.*?)#i', $myArray[$i]))
echo "\t\t\t".''.$theNdd.$anExt.' -> '.$myArray[$i].''."<br />\n";
$i++;
} ?>
<?php
$theNdd = "xiti"; // nom de domaine
$theNdd = escapeshellcmd($theNdd);
$theExt = array(".net",".fr",".com",".eu",".info",".biz",".org");
foreach($theExt as $anExt) {
$myArray = "";
$anExt=escapeshellcmd($anExt);
exec('whois '.$theNdd.$anExt,$myArray,$retval);
$i=0;
while ($i<=sizeof($myArray)) {
if (preg_match('#(created|Created\sOn|Domain\sRegistration\sDate|Registered):(.*?)#i', $myArray[$i]))
echo "\t\t\t".''.$theNdd.$anExt.' -> '.$myArray[$i].''."<br />\n";
$i++;
}
} ?>
KOogar a dit:>> Age d'un nom de domaine, ou prendre cette info?
voila la version php sur les 7 extensions principales :
Code:<?php $theNdd = "xiti"; // nom de domaine $theNdd = escapeshellcmd($theNdd); $theExt = array(".net",".fr",".com",".eu",".info",".biz",".org"); foreach($theExt as $anExt) { $myArray = ""; $anExt=escapeshellcmd($anExt); exec('whois '.$theNdd.$anExt,$myArray,$retval); $i=0; while ($i<=sizeof($myArray)) { if (preg_match('#(created|Created\sOn|Domain\sRegistration\sDate|Registered):(.*?)#i', $myArray[$i])) echo "\t\t\t".''.$theNdd.$anExt.' -> '.$myArray[$i].''."<br />\n"; $i++; } } ?>
ok, je vais voir chez ovh alorsKOogar a dit:Le script fonctionne chez OVH. Certain serveur désactive la fonction exec() pour des raisons de sécurité.
Les rapports renvoyées par les serveurs se trouve dans le tableau $myArray
➡️ Offre MyRankingMetrics ⬅️
pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)
Voir les détails ici