Kullanıcının Yerel İp adresini almak için aşağıdaki kodları html dosyasına kaydedip deneyebilirsiniz. <!doctype html> <html><head> <meta charset="utf-8"> <title>Yerel İp Adresi</title> </head><body> Senin Ağ İp Adresin: <h1 id=list>-</h1> <script> var RTCPeerConnection = /*window.RTCPeerConnection ||*/ window.webkitRTCPeerConnection || window.mozRTCPeerConnection; if (RTCPeerConnection) (function () { var rtc = new RTCPeerConnection({iceServers:[]}); if (1 || window.mozRTCPeerConnection) { rtc.createDataChannel('', {reliable:false}); }; rtc.onicecandidate = function (evt) { if (evt.candidate) grepSDP("a="+evt.candidate.candidate); }; rtc.createOffer(function (offerDesc) { grepSDP(offerDesc.sdp); rtc.setLocalDescription(offerDesc); }, function (e) { console.warn("offer failed", e); })
Veri bilimi, Yazılım, Programlama bloğu.