مشكل در whois

mosi20

Active Member
سلام
من مطابق توضيحات سايت http://www.ali1k.com/blog يك جستجوي دامين درست كردم اما نميدونم چرا اصلا بدنبال دامين نميگرده .اين http://www.mohsendavari.com/?what=searchdomain لينك صفحه اي هستش كه من جستجوي دامين را قرار دادم .
اين هم سورس صفحه .كسي ميتونه به من بگه اشكال كار من كجاست؟
PHP:
<?
///////////////////////////////////////////////////////////////////////////////////////
//                                   In the name of God                              //
//   This portal is a private portal And it was writen by Mohsen Davari              //
//   Please  do not change its copyright                                             //
//   I hope that you enjoy using my portal                                           //
//   If you have any problem contact me whith this email => [email protected]   //
//   Thank`s a lot                                                                   //
//   Bye                                                                             //
///////////////////////////////////////////////////////////////////////////////////////

// ensure this file is being included by a parent file //
if (!defined( 'mohsendavari_step1' )) {
echo "<script>document.location.href='login.php'</script>\n";
die;
exit();
}
include("top2.php");
$domain=$_POST['domain']; 
$ext=$_POST['ext']; 
$whoisServer=""; 
switch($ext){ 
case "com": 
case "net": 
case "edu": 
  $whoisServer="whois.internic.net"; 
  break; 
case "org": 
  $whoisServer="whois.publicinterestregistry.net"; 
  break; 
case "biz": 
  $whoisServer="whois.neulevel.biz"; 
  break; 
case "info": 
  $whoisServer="whois.afilias.info"; 
  break; 
case "ir": 
case "id.ir": 
case "co.ir": 
case "net.ir": 
  $whoisServer="whois.nic.ir"; 
  break; 
default: 
  $whoisServer= "whois.networksolutions.com"; 
}

//This checks the name for invaild characters 
function namecheck($domain) 
{ 
require("lang/domainlang_fa.php");
    if($domain==""){ 
     echo"$domnameless"; 
     return false; 
   } 
    if(strlen($domain)< 3){ 
     echo"$domnameless";  
     return false; 
   } 
    if(strlen($domain)>57){ 
     echo"$domnamemore"; 
     return false; 
    } 
    if(@ereg("^-|-$",$domain)){ 
     echo"$domnamenal"; 
     return false; 
    } 
    if(!ereg("([a-z]|[A-Z]|[0-9]|-){".strlen($domain)."}",$domain)){ 
     echo"$domnamenal"; 
      return false; 
   } 
    return true; 
} 

function dolookup($domain, $server){ 
$domain = strtolower($domain); 
$server = strtolower($server); 
if( $domain == '' || $server == '' ) return false; 
$data = ""; 
$fp = @fsockopen($server, 43,$errno, $errstr, 5); 
if( $fp ){ 
  @fputs($fp, $domain."\r\n"); 
  @socket_set_timeout($fp, 30); 
  while( !@feof($fp) ){ 
   $data .= @fread($fp, 4096); 
} 
@fclose($fp); 
return $data; 
}else{ 
  echo "\n\Error - could not open a connection to <b>$server</b>\n\n"; 
  return 0; 
} 
}

function check_exist($output) 
{ 
   //compare what has been returned by the server 
    if (eregi("Can't get information",$output) || eregi("No entries found",$output) || eregi("NOT FOUND",$output) || eregi("No match",$output) ){ 
        return 0; 
    }else{ 
        return nl2br($output); 
    } 
}


?>
  <TR>
    <TD  height="26" style="background-image: url('index_files/6.jpg'); background-repeat: no-repeat; background-position: left top" valign="middle">
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%">
      <tr>
        <td width="100%"  valign="middle" style="border-style: none; border-width: medium">
        <p align="center" dir="rtl"  class="maintitle2"><?=$searchdomain?></td>
      </tr>
    </table>
    </TD>
    </TR>
  <TR>
    <TD  height="27" style="background-image: url('index_files/5.jpg'); background-repeat: repeat-y; background-position: left top" valign="top">&nbsp;
    </TD>
    </TR>
  <TR>
    <TD background="index_files/00000001_r8_c10.jpg" height="200" style="background-image: url('index_files/00000001_r12_c2.jpg'); background-repeat: repeat-y; background-position: left top" valign="top">
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%">
   <tr> 
        <td width="62" style="border-style: none; border-width: medium">&nbsp;</td>   
        <td width="789" height="30" style="border-style: none; border-width: medium"> 
        <form name="form1" action="" method="post">
          <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%" height="72">
            <tr>
              <td width="100%" style="border-style: none; border-width: medium" height="23" valign="top" dir="rtl" align="center">&nbsp;</td>
            </tr>
            <tr>
              <td width="100%" style="border-style: none; border-width: medium" height="11" valign="top" dir="rtl" align="center">
              <p align="center" dir="rtl">
              <img border="0" src="index_files/search.gif" width="30" height="30"><span lang="fa" class="cats"><?=$searchdomain?>
              </span></td>
            </tr>
            <tr>
              <td width="100%" style="border-style: none; border-width: medium" height="36" valign="middle" dir="rtl" align="center">
        <select name="ext" dir="ltr"> 
          <option value="com">com</option> 
          <option value="net">net</option> 
          <option value="org">org</option> 
          <option value="biz">biz</option> 
          <option value="ir">ir</option> 
        </select>
              <input type="text" name="domain" size="30" class="text" dir="ltr" style="width: 150; height:22">&nbsp;
              <input type="submit" name="Submit"  Value="<?=$search?> "class="button"  style="width: 80"><br><br><center dir="rtl"> 
			  <?
if(namecheck($domain)){ 
if(($output=dolookup($domain.'.'.$ext, $whoisServer))){ 
  if(!($data=check_exist($output))){ 
    echo''.$h1.'';  
	echo'<br><a href="?what=orde&form=domain&item='.$domain.'.'.$ext.'> ['.$domain.'.'.$ext.']'.$regdomlink.'</a> ';       
   }else{ 
    echo''.$h2.''; 
   } 
  } 
}
?></center>
</td>
            </tr>
          </table>
        </form>
        <p align="center" dir="rtl" >
	<br>	


     </td>    
        <td width="62" style="border-style: none; border-width: medium">&nbsp;</td>   

      </tr>

      </table>
    </TD>
    </TR>
  <TR>

    <TD background="index_files/00000001_r8_c10.jpg" width="244" height="4" style="background-image: url('index_files/00000001_r13_c2.jpg'); background-repeat: repeat-y; background-position: left top" valign="top">&nbsp;
    </TD>
    </TR>
  <TR>
    <TD colSpan=2 background="index_files/00000001_r12_c1.jpg" height="40" width="883">&nbsp;</TD></TR></table>
 

M.Golshan

New Member
آقا به فرم Action ندادي !!!
لطفاً فرمتو درست کن. اگه باز هم کار نکرد، در خدمتيم...
 

M.Golshan

New Member
شما به جاي اين کد:
<form name="form1" action="" method="post">
اين کد رو بذار درست مي شه:
<form name="form1" action="index.php" method="get"><input type=hidden name=what value='searchdomain'>
 

M.Golshan

New Member
اگه هنوز مشکل داري :

PHP:
<? 
/////////////////////////////////////////////////////////////////////////////////////// 
//                                   In the name of God                              // 
//   This portal is a private portal And it was writen by Mohsen Davari              // 
//   Please  do not change its copyright                                             // 
//   I hope that you enjoy using my portal                                           // 
//   If you have any problem contact me whith this email => [email][email protected][/email]   // 
//   Thank`s a lot                                                                   // 
//   Bye                                                                             // 
/////////////////////////////////////////////////////////////////////////////////////// 

// ensure this file is being included by a parent file // 
if (!defined( 'mohsendavari_step1' )) { 
echo "<script>document.location.href='login.php'</script>\n"; 
die; 
exit(); 
} 
include("top2.php"); 
$domain=$_GET['domain']; 
$ext=$_GET['ext']; 
$whoisServer=""; 
switch($ext){ 
case "com": 
case "net": 
case "edu": 
  $whoisServer="whois.internic.net"; 
  break; 
case "org": 
  $whoisServer="whois.publicinterestregistry.net"; 
  break; 
case "biz": 
  $whoisServer="whois.neulevel.biz"; 
  break; 
case "info": 
  $whoisServer="whois.afilias.info"; 
  break; 
case "ir": 
case "id.ir": 
case "co.ir": 
case "net.ir": 
  $whoisServer="whois.nic.ir"; 
  break; 
default: 
  $whoisServer= "whois.networksolutions.com"; 
} 

//This checks the name for invaild characters 
function namecheck($domain) 
{ 
require("lang/domainlang_fa.php"); 
    if($domain==""){ 
     echo"$domnameless"; 
     return false; 
   } 
    if(strlen($domain)< 3){ 
     echo"$domnameless";   
     return false; 
   } 
    if(strlen($domain)>57){ 
     echo"$domnamemore"; 
     return false; 
    } 
    if(@ereg("^-|-$",$domain)){ 
     echo"$domnamenal"; 
     return false; 
    } 
    if(!ereg("([a-z]|[A-Z]|[0-9]|-){".strlen($domain)."}",$domain)){ 
     echo"$domnamenal"; 
      return false; 
   } 
    return true; 
} 

function dolookup($domain, $server){ 
$domain = strtolower($domain); 
$server = strtolower($server); 
if( $domain == '' || $server == '' ) return false; 
$data = ""; 
$fp = @fsockopen($server, 43,$errno, $errstr, 5); 
if( $fp ){ 
  @fputs($fp, $domain."\r\n"); 
  @socket_set_timeout($fp, 30); 
  while( !@feof($fp) ){ 
   $data .= @fread($fp, 4096); 
} 
@fclose($fp); 
return $data; 
}else{ 
  echo "\n\Error - could not open a connection to <b>$server</b>\n\n"; 
  return 0; 
} 
} 

function check_exist($output) 
{ 
   //compare what has been returned by the server 
    if (eregi("Can't get information",$output) || eregi("No entries found",$output) || eregi("NOT FOUND",$output) || eregi("No match",$output) ){ 
        return 0; 
    }else{ 
        return nl2br($output); 
    } 
} 


?> 
  <TR> 
    <TD  height="26" style="background-image: url('index_files/6.jpg'); background-repeat: no-repeat; background-position: left top" valign="middle"> 
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%"> 
      <tr> 
        <td width="100%"  valign="middle" style="border-style: none; border-width: medium"> 
        <p align="center" dir="rtl"  class="maintitle2"><?=$searchdomain?></td> 
      </tr> 
    </table> 
    </TD> 
    </TR> 
  <TR> 
    <TD  height="27" style="background-image: url('index_files/5.jpg'); background-repeat: repeat-y; background-position: left top" valign="top">&nbsp; 
    </TD> 
    </TR> 
  <TR> 
    <TD background="index_files/00000001_r8_c10.jpg" height="200" style="background-image: url('index_files/00000001_r12_c2.jpg'); background-repeat: repeat-y; background-position: left top" valign="top"> 
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%"> 
   <tr> 
        <td width="62" style="border-style: none; border-width: medium">&nbsp;</td>    
        <td width="789" height="30" style="border-style: none; border-width: medium"> 
        <form name="form1" action="index.php" method="GET"><input type=hidden name=what value='searchdomain'> 
          <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="100%" height="72"> 
            <tr> 
              <td width="100%" style="border-style: none; border-width: medium" height="23" valign="top" dir="rtl" align="center">&nbsp;</td> 
            </tr> 
            <tr> 
              <td width="100%" style="border-style: none; border-width: medium" height="11" valign="top" dir="rtl" align="center"> 
              <p align="center" dir="rtl"> 
              <img border="0" src="index_files/search.gif" width="30" height="30"><span lang="fa" class="cats"><?=$searchdomain?> 
              </span></td> 
            </tr> 
            <tr> 
              <td width="100%" style="border-style: none; border-width: medium" height="36" valign="middle" dir="rtl" align="center"> 
        <select name="ext" dir="ltr"> 
          <option value="com">com</option> 
          <option value="net">net</option> 
          <option value="org">org</option> 
          <option value="biz">biz</option> 
          <option value="ir">ir</option> 
        </select> 
              <input type="text" name="domain" size="30" class="text" dir="ltr" style="width: 150; height:22">&nbsp; 
              <input type="submit" name="Submit"  Value="<?=$search?> "class="button"  style="width: 80"><br><br><center dir="rtl"> 
              <? 
if(namecheck($domain)){ 
if(($output=dolookup($domain.'.'.$ext, $whoisServer))){ 
  if(!($data=check_exist($output))){ 
    echo''.$h1.'';   
    echo'<br><a href="?what=orde&form=domain&item='.$domain.'.'.$ext.'> ['.$domain.'.'.$ext.']'.$regdomlink.'</a> ';        
   }else{ 
    echo''.$h2.''; 
   } 
  } 
} 
?></center> 
</td> 
            </tr> 
          </table> 
        </form> 
        <p align="center" dir="rtl" > 
    <br>     


     </td>     
        <td width="62" style="border-style: none; border-width: medium">&nbsp;</td>    

      </tr> 

      </table> 
    </TD> 
    </TR> 
  <TR> 

    <TD background="index_files/00000001_r8_c10.jpg" width="244" height="4" style="background-image: url('index_files/00000001_r13_c2.jpg'); background-repeat: repeat-y; background-position: left top" valign="top">&nbsp; 
    </TD> 
    </TR> 
  <TR> 
    <TD colSpan=2 background="index_files/00000001_r12_c1.jpg" height="40" width="883">&nbsp;</TD></TR></table>

ببخشيد که اينجوري گذاشتم. آخه نمي دونستم چطور توي يک کادر مشخص بذارم.
وقت تست کردن هم نداشتم.
 

msnasiri

Member
ایشون راست می گن
چون اصلاً فرمت action اون خالیه
action مشخص می کنه که این اطلاعات باید به کجا فرستاده بشه
 

miladmovie

Active Member
اول اینکه M.Golshan جان لطف کن کدهات رو توی تگ [ php ] بگذار

بعد اینکه form می تونه بدون action کارش رو انجام بده
 

md5

Member
میشه بگی مشکلش دقیقا چیه؟
من تستش کردم بدون مشکل کار کرد
در ضمن از این به بعد وقتی میخوای کدی رو بزاری که دیگران تست کنن لطفا صفحاتی پیوندیش رو هم بزار
 

جدیدترین ارسال ها

بالا