Quantcast
Channel: BTSoru.com - Bilisim ve Yazilim Teknolojileri Soru/Cevap Platformu - latest questions
Viewing all articles
Browse latest Browse all 4270

Html Get Metodu Veri Çekme Sorunu?

$
0
0

http://www.ip-details.com/mpbe/?mode=5&domain=www.google.com.tralt textalt text Yukarıdaki adresten get metoduyla veri çekmeye çalıştığımda ilk başta boş ekran geliyor. Eğer kaynağı göster veya sayfayı geri ileri yaptığımda veri gözüküyor bunun nedeni ne olabilir çözüm nasıl sağlarım?

String request = "http://www.ip-details.com/mpbe/?mode=5&domain=www.google.com.tr";
URL url = new URL(request); 
        HttpURLConnection con = (HttpURLConnection) url.openConnection(); 
con.setRequestMethod("GET");    
 int responseCode = con.getResponseCode();
        System.out.println("\\nSending 'GET' request to URL : " + url);
        System.out.println("Response Code : " + responseCode);
        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String inputLine;
        StringBuffer response = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
         System.out.println(">:"+response.toString());

Siteye Ait Javascript Kodu(http://www.ip-details.com/domain-host-search/)

function getdomaindetails()
{
        if (conn)
        {
                conn.onreadystatechange = function() {};
                conn.abort();
        }
        conn = getconn();
        conn.open("GET", "/mpbe/?mode=5&domain="+escape(trim(document.getElementById('domainsearchtextbox').value)), true);
        conn.onreadystatechange = function()
        {
            if(conn.readyState==4)
            {
                if(trim(conn.responseText)!='')
                {
                    var x1=conn.responseText.split("~");
                    document.getElementById("domainspan").innerHTML=trim(document.getElementById('domainsearchtextbox').value);
                    document.getElementById("hostspan").innerHTML=x1[0];
                    var x2=x1[1].split("|");
                    var x3,x4;
                    x4="";
                    for(x3=0;x3<x2.length;x3++)
                    {
                        if(x4!="")
                        {
                            x4=x4+"<br />";
                        }
                        x4=x4+x2[x3];
                    }
                    document.getElementById("aliasspan").innerHTML=x4;
                    iplist=x1[2].split("|");
                    getipdetails(0);
                }
                else
                {
                    document.getElementById("searchresultsout").style.display="none";
                    document.getElementById("responsediv").innerHTML="No host found. Please try again.";
                    document.getElementById("responsediv").style.display="block";
                }

            }
        }
        conn.send(null);            
}

Viewing all articles
Browse latest Browse all 4270

Trending Articles


huddam daveti


Tekasür Suresi


"Yâ Kuddûs!" Esması Havâs ve Esrârı


Kasemi Mübelliğa


Peri44


Kuvvetli muhabbet ve aşk tılsımı


El-Mütekebbir


Papaz büyüsü


SCCM 2012 Client Installation issue


Zilhicce Ayının Namaz Duası ÖNEMLİ