SORU
24 Aralık 2008, ÇARŞAMBA


İstemci IP sadece JavaScript kullanarak mı?

Bir şekilde istemcinin IP adresi saf JavaScript; sunucu taraflı kod bile SSI kullanarak çekmek istiyorum.

Herhangi bir fikir?

Eğer birisi bir tane önerebilirim eğer ücretsiz 3. parti bir script kullanmaya karşı değilim. Bu yeni bir kod uygulayabiliriz kadar acil durdurma bir uçurum var.

CEVAP
1 Mayıs 2009, Cuma


, Bu geçişi JSONP ile sunucu tarafı)

Ve bir tane bulmak için googling iken, burada bu KADAR http://stackoverflow.com/questions/102605/can-i-lookup-the-ip-address-of-a-hostname-from-javascript bulundu

<script type="application/javascript">
    function getip(json){
      alert(json.ip); // alerts the ip address
    }
</script>

<script type="application/javascript" src="http://jsonip.appspot.com/?callback=getip"></script>

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Feel The Electricity!

    Feel The Ele

    20 ŞUBAT 2010
  • Joseph Hayhoe

    Joseph Hayho

    20 Mayıs 2010
  • WhtButterflyLiz

    WhtButterfly

    14 NİSAN 2008