Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

php script za proveru dostupnosti domena

[es] :: PHP :: php script za proveru dostupnosti domena

[ Pregleda: 4389 | Odgovora: 7 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Mitrović Srđan
bloodzero
Freelance
Majur //: Šabac

Član broj: 10261
Poruke: 2800
62.108.116.*

Sajt: freeshell-reviews.com


+4 Profil

icon php script za proveru dostupnosti domena30.08.2006. u 21:09 - pre 154 meseci
Treba mi neki dobar skript koji ce da proverava dostupnost domena.
Preporuke?
Tony Melendez:
http://video.google.com/videoplay?docid=-
3819862628517136815&q=tony+melendez

NIKADA NE UZIMATI HOSTING NA GO DADDY!


 
Odgovor na temu

danield
Daniel Dulic
Web developer, CitySu team
Subotica

Član broj: 101580
Poruke: 113
*.co.yu
Via: [es] mailing liste

ICQ: 443682699
Sajt: www.citysuteam.com


Profil

icon Re: php script za proveru dostupnosti domena31.08.2006. u 12:12 - pre 154 meseci
Imas na www.php.com.hr ja sam slucajno tamo video i zapamtio

--

With The Best Regards,

Daniel Dulić, Web System Development
http://www.citysuteam.com
Telefon: +381 (0) 64 / 364 - 65 - 91
E-Mail: daniel.dulic@citysuteam.com
CitySu team, Web Services Company
Antona Aškerca 44/50,
24000 Subotica
CitySu team
 
Odgovor na temu

1r0nM4n
Nenad Vasić
Web Developer
Beograd

Član broj: 55970
Poruke: 441
212.200.24.*

ICQ: 303614173
Sajt: www.nenadvasic.com


+1 Profil

icon Re: php script za proveru dostupnosti domena31.08.2006. u 12:48 - pre 154 meseci
http://php.com.hr/115

Code:
<?php
function lookup($domain)
{
    exec("host -t ns $domain",$hasil);
    if (ereg("host not found.",strtolower(trim($hasil[0]))))
    // It possible only 1 ns or not found
    {
        return false;
    } else
    {
        $hasilstr="";
        for ($i=0;$i<=count($hasil);$i++)
        {
        $hasilstr.=ereg_replace("$domain name server","<LI>",$hasil[$i])."<BR>";
        }
        return $hasilstr;
    }


?>


Primjer:


<?
if (lookup("stiawan.net"))
{
    echo "stiawan.net already use";
} else
{
    echo "stiawan.net is available";
}
?>


@blood, zar ti nemash drugi nick ovde? :)

p0z
 
Odgovor na temu

Mitrović Srđan
bloodzero
Freelance
Majur //: Šabac

Član broj: 10261
Poruke: 2800
212.62.46.*

Sajt: freeshell-reviews.com


+4 Profil

icon Re: php script za proveru dostupnosti domena01.09.2006. u 10:02 - pre 154 meseci
blood mi je banovan davnih dana :)
a imam da aleksandrin tj ovaj. bl00dz3r0 je od kuce

Hvala momci.
Tony Melendez:
http://video.google.com/videoplay?docid=-
3819862628517136815&q=tony+melendez

NIKADA NE UZIMATI HOSTING NA GO DADDY!


 
Odgovor na temu

Milan Pavlovic
Milan Pavlovic
Foto Ljuba Digital DPC
Majur, Sabac

Član broj: 6986
Poruke: 122
62.108.116.*

Sajt: www.andromedafx.com


+1 Profil

icon Re: php script za proveru dostupnosti domena05.09.2006. u 00:49 - pre 154 meseci
neka neko objasni kako ta skripta radi posto mi nije jasno, probao sam i sledecu skriptu ali mi ne radi, evo i koda

index.php fajl

Code:

<html>
<head>
<title>Whois</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="index.php">
  Domain: <input type="text" name="dom">
  <input type="submit" name="Submit" value="Submit">
</form>
<?
if ($dom){
    include "./whois.inc";
    $whoisresult = lookup($dom);
    $isavail = $whoisresult[0]; // Contains "1" is it's available, blank if it's registered
    $whotext = $whoisresult[1]; // Contains the full response from the server.
    #The PRE tags are there to display the results in web browsers without replacing \n with <br>..its just cleaner and quicker that way. ;)
    if ($isavail=="1"){
        print "<b>This domain is available!</b>";
    }
        else
    {
        print "<b>This domain has been registered.</b>";
    }
    print "<pre>".$whotext."</pre>";
}
?>
</body>
</html>


whois.inc

Code:

<?
function get_whois_info($domain){
$whoisservers=array(
        array("ac","whois.nic.ac","No match"),
        array("ac.cn","whois.cnnic.net.cn","No entries found"),
        array("ac.jp","whois.nic.ad.jp","No match"),
        array("ac.uk","whois.ja.net","no entries"),
        array("ad.jp","whois.nic.ad.jp","No match"),
        array("adm.br","whois.nic.br","No match"),
        array("adv.br","whois.nic.br","No match"),
        array("aero","whois.information.aero","is available"),
        array("ag","whois.nic.ag","does not exist"),
        array("agr.br","whois.nic.br","No match"),
        array("ah.cn","whois.cnnic.net.cn","No entries found"),
        array("al","whois.ripe.net","No entries found"),
        array("am.br","whois.nic.br","No match"),
        array("arq.br","whois.nic.br","No match"),
        array("at","whois.nic.at","nothing found"),
        array("au","whois.aunic.net","No Data Found"),
        array("art.br","whois.nic.br","No match"),
        array("as","whois.nic.as","Domain Not Found"),
        array("asn.au","whois.aunic.net","No Data Found"),
        array("ato.br","whois.nic.br","No match"),
        array("be","whois.geektools.com","No such domain"),
        array("bg","whois.digsys.bg","does not exist"),
        array("bio.br","whois.nic.br","No match"),
        array("biz","whois.biz","Not found"),
        array("bj.cn","whois.cnnic.net.cn","No entries found"),
        array("bmd.br","whois.nic.br","No match"),
        array("br","whois.registro.br","No match"),
        array("ca","whois.cira.ca","AVAIL"),
        array("cc","whois.nic.cc","No match"),
        array("cd","whois.cd","No match"),
        array("ch","whois.nic.ch","We do not have an entry"),
        array("cim.br","whois.nic.br","No match"),
        array("ck","whois.ck-nic.org.ck","No entries found"),
        array("cl","whois.nic.cl","no existe"),
        array("cn","whois.cnnic.net.cn","no matching record"),
        array("cng.br","whois.nic.br","No match"),
        array("cnt.br","whois.nic.br","No match"),
        array("com","whois.verisign-grs.net","No match"),
        array("com.au","whois.aunic.net","No Data Found"),
        array("com.br","whois.nic.br","No match"),
        array("com.cn","whois.cnnic.net.cn","no matching record"),
        array("com.eg","whois.ripe.net","No entries found"),
        array("com.hk","whois.hknic.net.hk","No Match for"),
        array("com.mx","whois.nic.mx","No Encontradas"),
        array("com.ru","whois.ripn.ru","No entries found"),
        array("com.tw","whois.twnic.net","NO MATCH TIP"),
        array("conf.au","whois.aunic.net","No entries found"),
        array("co.jp","whois.nic.ad.jp","No match"),
        array("co.uk","whois.nic.uk","No match for"),
        array("cq.cn","whois.cnnic.net.cn","No entries found"),
        array("csiro.au","whois.aunic.net","No Data Found"),
        array("cx","whois.nic.cx","No match"),
        array("cz","whois.nic.cz","No data found"),
        array("de","whois.denic.de","No entries found"),
        array("dk","whois.dk-hostmaster.dk","No entries found"),
        array("ecn.br","whois.nic.br","No match"),
        array("ee","whois.eenet.ee","NOT FOUND"),
        array("edu","whois.verisign-grs.net","No match"),
        array("edu.au","whois.aunic.net","No Data Found"),
        array("edu.br","whois.nic.br","No match"),
        array("eg","whois.ripe.net","No entries found"),
        array("es","whois.ripe.net","No entries found"),
        array("esp.br","whois.nic.br","No match"),
        array("etc.br","whois.nic.br","No match"),
        array("eti.br","whois.nic.br","No match"),
        array("eun.eg","whois.ripe.net","No entries found"),
        array("emu.id.au","whois.aunic.net","No Data Found"),
        array("eng.br","whois.nic.br","No match"),
        array("far.br","whois.nic.br","No match"),
        array("fi","whois.ripe.net","No entries found"),
        array("fj","whois.usp.ac.fj",""),
        array("fj.cn","whois.cnnic.net.cn","No entries found"),
        array("fm.br","whois.nic.br","No match"),
        array("fnd.br","whois.nic.br","No match"),
        array("fot.br","whois.nic.br","No match"),
        array("fst.br","whois.nic.br","No match"),
        array("fr","whois.nic.fr","No entries found"),
        array("g12.br","whois.nic.br","No match"),
        array("gd.cn","whois.cnnic.net.cn","No entries found"),
        array("ge","whois.ripe.net","no entries found"),
        array("ggf.br","whois.nic.br","No match"),
        array("gl","whois.ripe.net","no entries found"),
        array("gr","whois.ripe.net","no entries found"),
        array("gr.jp","whois.nic.ad.jp","No match"),
        array("gs","whois.adamsnames.tc","is not registered"),
        array("gov","whois.nic.gov","No entries found"),
        array("gs.cn","whois.cnnic.net.cn","No entries found"),
        array("gov.au","whois.aunic.net","No Data Found"),
        array("gov.br","whois.nic.br","No match"),
        array("gov.cn","whois.cnnic.net.cn","No entries found"),
        array("gov.hk","whois.hknic.net.hk","No Match for"),
        array("gob.mx","whois.nic.mx","No Encontradas"),
        array("gs","whois.adamsnames.tc","is not registered"),
        array("gz.cn","whois.cnnic.net.cn","No entries found"),
        array("gx.cn","whois.cnnic.net.cn","No entries found"),
        array("he.cn","whois.cnnic.net.cn","No entries found"),
        array("ha.cn","whois.cnnic.net.cn","No entries found"),
        array("hb.cn","whois.cnnic.net.cn","No entries found"),
        array("hi.cn","whois.cnnic.net.cn","No entries found"),
        array("hl.cn","whois.cnnic.net.cn","No entries found"),
        array("hn.cn","whois.cnnic.net.cn","No entries found"),
        array("hm","whois.registry.hm","(null)"),
        array("hk","whois.hknic.net.hk","No Match for"),
        array("hk.cn","whois.cnnic.net.cn","No entries found"),
        array("hu","whois.ripe.net","MAXCHARS:500"),
        array("id.au","whois.aunic.net","No Data Found"),
        array("ie","whois.domainregistry.ie","no match"),
        array("ind.br","whois.nic.br","No match"),
        array("imb.br","whois.nic.br","No match"),
        array("inf.br","whois.nic.br","No match"),
        array("info","whois.afilias.info","Not found"),
        array("info.au","whois.aunic.net","No Data Found"),
        array("it","whois.nic.it","No entries found"),
        array("idv.tw","whois.twnic.net","NO MATCH TIP"),
        array("int","whois.iana.org","not found"),
        array("is","whois.isnic.is","No entries found"),
        array("il","whois.isoc.org.il","No data was found"),
        array("jl.cn","whois.cnnic.net.cn","No entries found"),
        array("jor.br","whois.nic.br","No match"),
        array("jp","whois.nic.ad.jp","No match"),
        array("js.cn","whois.cnnic.net.cn","No entries found"),
        array("jx.cn","whois.cnnic.net.cn","No entries found"),
        array("kr","whois.krnic.net","is not registered"),
        array("la","whois.nic.la","NO MATCH"),
        array("lel.br","whois.nic.br","No match"),
        array("li","whois.nic.ch","We do not have an entry"),
        array("lk","whois.nic.lk","No domain registered"),
        array("ln.cn","whois.cnnic.net.cn","No entries found"),
        array("lt","ns.litnet.lt","No matches found"),
        array("lu","whois.dns.lu","No entries found"),
        array("lv","whois.ripe.net","no entries found"),
        array("ltd.uk","whois.nic.uk","No match for"),
        array("mat.br","whois.nic.br","No match"),
        array("mc","whois.ripe.net","No entries found"),
        array("me.uk","whois.nic.uk","No match for"),
        array("med.br","whois.nic.br","No match"),
        array("mil","whois.nic.mil","No match"),
        array("mil.br","whois.nic.br","No match"),
        array("mn","whois.nic.mn","Domain not found"),
        array("mo.cn","whois.cnnic.net.cn","No entries found"),
        array("ms","whois.adamsnames.tc","is not registered"),
        array("mus.br","whois.nic.br","No match"),
        array("mx","whois.nic.mx","No Encontradas"),
        array("name","whois.nic.name","No match."),
        array("ne.jp","whois.nic.ad.jp","No match"),
        array("net","whois.verisign-grs.net","No match"),
        array("net.au","whois.aunic.net","No Data Found"),
        array("net.br","whois.nic.br","No match"),
        array("net.cn","whois.cnnic.net.cn","No entries found"),
        array("net.eg","whois.ripe.net","No entries found"),
        array("net.hk","whois.hknic.net.hk","No Match for"),
        array("net.lu","whois.dns.lu","No entries found"),
        array("net.mx","whois.nic.mx","No Encontradas"),
        array("net.uk","whois.nic.uk","No match for "),
        array("net.ru","whois.ripn.ru","No entries found"),
        array("net.tw","whois.twnic.net","NO MATCH TIP"),
        array("nl","whois.domain-registry.nl","is not a registered domain"),
        array("nm.cn","whois.cnnic.net.cn","No entries found"),
        array("no","whois.norid.no","no matches"),
        array("nom.br","whois.nic.br","No match"),
        array("not.br","whois.nic.br","No match"),
        array("ntr.br","whois.nic.br","No match"),
        array("nu","whois.nic.nu","NO MATCH for"),
        array("nx.cn","whois.cnnic.net.cn","No entries found"),
        array("nz","whois.domainz.net.nz","220 Available"),
        array("plc.uk","whois.nic.uk","No match for"),
        array("odo.br","whois.nic.br","No match"),
        array("oop.br","whois.nic.br","No match"),
        array("or.jp","whois.nic.ad.jp","No match"),
        array("org","whois.pir.org","NOT FOUND"),
        array("org.au","whois.aunic.net","No Data Found"),
        array("org.br","whois.nic.br","No match"),
        array("org.cn","whois.cnnic.net.cn","No entries found"),
        array("org.hk","whois.hknic.net.hk","No Match for"),
        array("org.lu","whois.dns.lu","No entries found"),
        array("org.ru","whois.ripn.ru","No entries found"),
        array("org.tw","whois.twnic.net","NO MATCH TIP"),
        array("org.uk","whois.nic.uk","No match for"),
        array("pl","nazgul.nask.waw.pl","does not exists"),
        array("plc.uk","whois.nic.uk","No match for"),
        array("pp.ru","whois.ripn.ru","No entries found"),
        array("ppg.br","whois.nic.br","No match"),
        array("pro.br","whois.nic.br","No match"),
        array("psi.br","whois.nic.br","No match"),
        array("psc.br","whois.nic.br","No match"),
        array("pt","whois.ripe.net","No entries found"),
        array("qh.cn","whois.cnnic.net.cn","No entries found"),
        array("qsl.br","whois.nic.br","No match"),
        array("rec.br","whois.nic.br","No match"),
        array("ro","whois.rotld.ro","No entries found"),
        array("ru","whois.ripn.ru","No entries found"),
        array("sc.cn","whois.cnnic.net.cn","No entries found"),
        array("sd.cn","whois.cnnic.net.cn","No entries found"),
        array("se","whois.nic-se.se","No data found"),
        array("sg","whois.nic.net.sg","NO entry found"),
        array("sh","whois.nic.sh","No match for"),
        array("sh.cn","whois.cnnic.net.cn","No entries found"),
        array("si","whois.arnes.si","No entries found"),
        array("sk","whois.ripe.net","no entries found"),
        array("slg.br","whois.nic.br","No match"),
        array("sm","whois.ripe.net","no entries found"),
        array("sn.cn","whois.cnnic.net.cn","No entries found"),
        array("srv.br","whois.nic.br","No match"),
        array("st","whois.nic.st","No entries found"),
        array("sx.cn","whois.cnnic.net.cn","No entries found"),
        array("tc","whois.adamsnames.tc","is not registered"),
        array("th","whois.nic.uk","No entries found"),
        array("tj.cn","whois.cnnic.net.cn","No entries found"),
        array("tld.uk","whois.nic.uk","No match for"),
        array("tmp.br","whois.nic.br","No match"),
        array("to","whois.tonic.to","No match"),
        array("tr","whois.ripe.net","Not found in database"),
        array("trd.br","whois.nic.br","No match"),
        array("tur.br","whois.nic.br","No match"),
        array("tv","whois.tv","MAXCHARS:75"),
        array("tv.br","whois.nic.br","No match"),
        array("tw","whois.twnic.net","NO MATCH TIP"),
        array("tw.cn","whois.cnnic.net.cn","No entries found"),
        array("uk","whois.thnic.net","No match for"),
        array("us","whois.nic.us","Not found:"),
        array("va","whois.ripe.net","No entries found"),
        array("vet.br","whois.nic.br","No match"),
        array("vg","whois.adamsnames.tc","is not registered"),
        array("wattle.id.au","whois.aunic.net","No Data Found"),
        array("ws","whois.worldsite.ws","No match for"),
        array("xj.cn","whois.cnnic.net.cn","No entries found"),
        array("xz.cn","whois.cnnic.net.cn","No entries found"),
        array("yn.cn","whois.cnnic.net.cn","No entries found"),
        array("zlg.br","whois.nic.br","No match"),
        array("zj.cn","whois.cnnic.net.cn","No entries found"),
        array("fo","whois.ripe.net","no entries found")
        );
    $whocnt = count($whoisservers);
    for ($x=0;$x<$whocnt;$x++){
        $artld = $whoisservers[$x][0];
        $tldlen = intval(0 - strlen($artld));
        if (substr($domain, $tldlen) == $artld) {
            $out[0] = $whoisservers[$x][1];
            $out[1] = $whoisservers[$x][2];
            return $out;
        }
    }
    return $out;
}

function lookup($dom){
    $whoinf = get_whois_info($dom);
    $lusrv = $whoinf[0];
    $notfndtxt = $whoinf[1];

    if (!$lusrv) return "";

    $fp = fsockopen($lusrv,43);
    fputs($fp, "$dom\r\n");
    $string="";
    while(!feof($fp)){
        $string.= fgets($fp,128);
    }
    fclose($fp);

    $reg = "/Whois Server: (.*?)\n/i";
    preg_match_all($reg, $string, $matches);
    $secondtry = $matches[1][0];

    if ($secondtry){
        $fp = fsockopen($secondtry,43);
        fputs($fp, "$dom\r\n");
        $string="";
        while(!feof($fp)){
            $string.=fgets($fp,128);
        }
        fclose($fp);
    }
    if (stristr($string, $notfndtxt)) $data[0] = "1";
    $data[1] = $string;
    return $data;
}
?>


nece pa nece, pomagajte, stvarno mi je to potrebno sto pre
Do not try to bend the spoon, that's impossible.
Instead just try to realize the truth.
What truth?
There is no spoon.
There is no spoon?
Then you'll see that is not the spoon that bends, it is only yourself.
 
Odgovor na temu

glavince
Ohrid/Macedonia

Član broj: 66412
Poruke: 246
62.162.91.*

Sajt: ohridnews.com


Profil

icon Re: php script za proveru dostupnosti domena05.09.2006. u 08:44 - pre 154 meseci
Kod mene radi.
 
Odgovor na temu

Mitrović Srđan
bloodzero
Freelance
Majur //: Šabac

Član broj: 10261
Poruke: 2800
62.108.116.*

Sajt: freeshell-reviews.com


+4 Profil

icon Re: php script za proveru dostupnosti domena05.09.2006. u 22:01 - pre 154 meseci
Radi u potpunosti vraca rezultat?
Tony Melendez:
http://video.google.com/videoplay?docid=-
3819862628517136815&q=tony+melendez

NIKADA NE UZIMATI HOSTING NA GO DADDY!


 
Odgovor na temu

Milan Pavlovic
Milan Pavlovic
Foto Ljuba Digital DPC
Majur, Sabac

Član broj: 6986
Poruke: 122
62.108.116.*

Sajt: www.andromedafx.com


+1 Profil

icon Re: php script za proveru dostupnosti domena07.09.2006. u 00:54 - pre 154 meseci
problem je bio sa serverom zato sto nisu bile ukljucene globalne funkcije. Zaobisao sam tako sto sam u .htaccess dodao sledecu liniju

php_value register_globals 1

i to je resilo stvar
Do not try to bend the spoon, that's impossible.
Instead just try to realize the truth.
What truth?
There is no spoon.
There is no spoon?
Then you'll see that is not the spoon that bends, it is only yourself.
 
Odgovor na temu

[es] :: PHP :: php script za proveru dostupnosti domena

[ Pregleda: 4389 | Odgovora: 7 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.