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

  • George McCarron

    George McCar

    29 Mayıs 2013
  • Jordie Jordan

    Jordie Jorda

    27 Ocak 2008
  • NewsyTech

    NewsyTech

    2 AĞUSTOS 2010