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

  • MaximumPCMag

    MaximumPCMag

    23 Temmuz 2010
  • steeletraining

    steeletraini

    28 NİSAN 2010
  • The Onion

    The Onion

    14 Mart 2006