session_start() ;
include ("../functions/connexion.php");
if (isset($_POST['verifier'])){$verifier = $_POST['verifier'];} else{$verifier="";}
$msg="";
$aff_old_div="block";
$aff_new_div="none";
if($verifier=="ok"){
$aff_old_div="block";
$domaine="";
if (isset($_POST['critere'])){$critere = $_POST['critere'];}else{$critere="";}
if (isset($_POST['extension'])){$extension = $_POST['extension'];}else{$extension="";}
if (isset($_POST['new'])){$new = $_POST['new'];}else{$new="";}
$critere=htmlentities($critere);
$extension=htmlentities($extension);
$double=ereg("--",$critere);
$is_alpha1 = ereg("^[0-9A-Za-z-]+$", $critere);
if(($is_alpha1=="1") && ($double!="1")){
$critere==strtolower($critere);
$extension==strtolower($extension);
$result_int = mysql_query("SELECT * FROM domaine_interdit where (domaine = '$critere')");
$r_int = mysql_fetch_array($result_int);
$id_int = $r_int["id"];
$result_trsf = mysql_query("SELECT * FROM registrant_transfert where (domaine = '$critere') and (extension='$extension')");
$r_trsf = mysql_fetch_array($result_trsf);
$id_trsf = $r_trsf["id"];
if($id_int!=""){
$msg="This domain name: \"$critere$extension\" cannot be transfered.";
$domaine="";
}
if($id_trsf!=""){
$msg="There is an issue for the transfer of this particular domain name: \"$critere$extension\"
Please contact our customer service by email to com@internic.ma for futher explanation.";
$domaine="";
}
$domaine=$critere;
$domaine.=$extension;
}
if((($is_alpha1!=1) || ($double=="1")) && ($critere!="")){
$msg="The domain name\"$critere$extension\" is incorrect. Allowed characters are: \"a-z\" ,\" 0-9\" and \"-\"";
}
if($domaine=="oasis.ma"){$domaine="";}
if($domaine!=""){
error_reporting(0);
set_time_limit(0);
ob_start();
$ext = array(
'.com' => array('whois.crsnic.net','No match for'),
'.net' => array('whois.crsnic.net','No match for'),
'.biz' => array('whois.biz','Not found'),
'.mobi' => array('whois.dotmobiregistry.net', 'NOT FOUND'),
'.org' => array('whois.publicinterestregistry.net', 'NOT FOUND'),
'.tv' => array('whois.nic.tv', 'No match for'),
'.info' => array('whois.afilias.net','NOT FOUND'),
'.name' => array('whois.nic.name','No match'),
'.ma' => array('whois.iam.net.ma','No Object Found'),
'.net.ma' => array('whois.iam.net.ma','No Object Found'),
'.co.ma' => array('whois.iam.net.ma','No Object Found'),
'.press.ma' => array('whois.iam.net.ma','No Object Found'),
'.ac.ma' => array('whois.iam.net.ma','No Object Found'),
);
unset($buffer);
preg_match('@^(http://www\.|http://|www\.)?([^/]+)@i', $domaine, $matches);
$domain = $matches[2];
$tld = explode('.', $domain, 2);
$extension_2 = strtolower(trim($tld[1]));
if(strlen($domain) > 0 && array_key_exists('.' . $extension_2, $ext)) {
$server = $ext['.' .$extension_2][0];
$sock = fsockopen($server, 43) or die('Error Connecting To Server:' . $server);
fputs($sock, "$domain\r\n");
while( !feof($sock) ) { $buffer .= fgets($sock,128); }
fclose($sock);
if(eregi($ext['.' . $extension_2][1], $buffer)) { $aff_new_div="block"; $aff_old_div="none"; }
else
{
$_SESSION['domain']=$critere;
$_SESSION['extension']=$extension;
$_SESSION['new']=$new;
if($new=="no"){HEADER( "location: transfer.php" ) ;}
if($new=="yes"){HEADER( "location: ../login/?d=t" ) ;}
}
}
}
if($domaine!=""){
ob_flush();
flush();
sleep(0.1);
}
}
?>
|
">
echo"$msg";?>
|