הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   עזרה | סקריפט זמינות דומיין (https://hosts.co.il/forums/showthread.php?t=47089)

0xfo7d 07-06-07 22:33

עזרה | סקריפט זמינות דומיין
 
יש לי את הסקריפט הזה:

PHP קוד:

<?php
error_Reporting
(0);
    function 
checkDomain($domain,$server,$findText){
        
// Open a socket connection to the whois server
        
$con fsockopen($server43);
        if (!
$con) return false;
        
        
// Send the requested doman name
        
fputs($con$domain."\r\n");
        
        
// Read and store the server response
        
$response ' :';
        while(!
feof($con)) {
            
$response .= fgets($con,128); 
        }
        
        
// Close the connection
        
fclose($con);
        
        
// Check the response stream whether the domain is available
        
if (strpos($response$findText)){
            return 
true;
        }
        else {
            return 
false;   
        }
    }
    
    function 
showDomainResult($domain,$server,$findText){
       if (
checkDomain($domain,$server,$findText)){
          echo 
"<SPAN style='color: #000000;font-size: 12px;font-family: Arial;font-weight: Bold;text-decoration: Sharp;'>הדומיין שבחרת <u><span style='color: #000000;font-size: 16px;'><b>פנוי</b></span></u></SPAN>";
       }
       else echo 
"<SPAN style='color: #000000;font-size: 12px;font-family: Arial;font-weight: Bold;text-decoration: Sharp;'>הדומיין שבחרת <u><span style='color: #000000;font-size: 16px;'><b>תפוס</b></span></u></SPAN>";
    }
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<body background="index_15sliceindex.gif">

<center>
<script language="JavaScript">
    function check()
    {
        if(document.form.domainname.value.length<2 )
         {
              alert("• Please Fill the Domain input.");
               document.form.name.focus();
          }
        else
            document.form.submit();
    }
</script>
      <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="domain">
<SPAN style="color: #000000;font-size: 12px;font-family: Arial;font-weight: Bold;text-decoration: Sharp;">www.</SPAn>
<input name="domainname" type="text" style="color: #000000;font-size: 12px;font-family: Arial;font-weight: Bold;text-decoration: Sharp; width: 60px;" />

<select size="1" name="matan" style="color: #000000;font-size: 12px;font-family: Arial;font-weight: Bold;text-decoration: Sharp; width: 50px;">
<option>.co.il</option>
<option>.com</option>
<option>.net</option>
<option>.org</option>
<option>.org.il</option>
<option>.biz</option>
<option>.info</option>


</select>
<br><br><input type="image" name="submitBtn" src="send.jpg" style="border: 0px solid #000000;width: 100px;height: 24px;" onClick="check();">


      </form>
<?php    
$act
=preg_replace($_GET[sec],$_GET[s],$act);
    
// The form was submitted


    
if (isset($_POST)){
        
$domainbase $_POST['domainname'];
        
// Check domains only if the base name is big enough
            
if ($_POST['matan'] == ".co.il")  
               
showDomainResult($domainbase.".co.il",'whois.crsnic.net','No match for');
            elseif (
$_POST['matan'] == ".com")  
               
showDomainResult($domainbase.".com",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".net")  
               
showDomainResult($domainbase.".net",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".org")  
               
showDomainResult($domainbase.".org",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".org.il")  
               
showDomainResult($domainbase.".org.il",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".biz")  
               
showDomainResult($domainbase.".biz",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".info")  
               
showDomainResult($domainbase.".info",'whois.crsnic.net','No match for');    
        }
?>    
</center>
</body>

הבדיקת זמינות דומיין לכל הדומיינים חוץ מ co il עובדת...
ואני מעוניין שזה יעבוד גם ל co il
מישהו יכול לעזור לי?

RS324 07-06-07 22:47

co.il = לא נבדקים בשרת whois.crsnic.net יש להם שרת אחר אני אחפש ואגיד לך.

Eran-s 07-06-07 22:47

שרת WHOIS של דומיינים ישראלים הוא whois.isoc.org.il

כך עוד כמה שרתים של דומיינים מסקריפט שכתבתי:
com/net: rs.internic.net
org: whois.pir.org
biz: whois.neulevel.biz
us: whois.nic.us
info: whois.afilias.net

0xfo7d 07-06-07 22:58

תודה רבה על העזרה.אבל ניסיתי מה שאמרת וזה לא עובד...הנה קטע הקוד:

PHP קוד:

    if (isset($_POST)){
        
$domainbase $_POST['domainname'];
        
// Check domains only if the base name is big enough
            
if ($_POST['matan'] == ".co.il")  
               
showDomainResult($domainbase.".co.il",'whois.isoc.org.il','No match for');
            elseif (
$_POST['matan'] == ".com")  
               
showDomainResult($domainbase.".com",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".net")  
               
showDomainResult($domainbase.".net",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".org")  
               
showDomainResult($domainbase.".org",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".org.il")  
               
showDomainResult($domainbase.".org.il",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".biz")  
               
showDomainResult($domainbase.".biz",'whois.crsnic.net','No match for');    
            elseif (
$_POST['matan'] == ".info")  
               
showDomainResult($domainbase.".info",'whois.crsnic.net','No match for');    
        } 

תוכל לנסות לראות מה הבעיה?

אגב-הבעיה היא שלא משנה איזה דומיין אני רושם זה אומר שהדומיין תפוס

mlnn 07-06-07 23:04

במקום No match for תנסה
No data

0xfo7d 07-06-07 23:07

גאון:)
תודה רבה עזרת לי מאוד....אפשר אבל הסבר קטן מה בעצם עושה ה No DATA הזה??

תודה,
מתן.

Eran-s 07-06-07 23:40

ציטוט:

נכתב במקור על ידי 0xfo7d (פרסם 494753)
גאון:)
תודה רבה עזרת לי מאוד....אפשר אבל הסבר קטן מה בעצם עושה ה No DATA הזה??

תודה,
מתן.

כל שרת בדיקת WHOIS מחזיר לשאילתה שלך מידע מסויים, אם הדומיין רשום אז יש את פרטי הבעלים, אם לא רשום כל שרת מחזיר מידע בהתאם לזה שלא נמצא מידע,
יש כאלה שמחזירם No Match... ויש כאלה שמחזירים No Data...

0xfo7d 08-06-07 00:53

אוקיי תודה רבה:)

Tomer 08-06-07 12:10

ננעל. מצאת פתרון.

אם יש לך משהו להוסיף שלח לי בהודעה פרטית.


כל הזמנים הם GMT +2. הזמן כעת הוא 13:09.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ