I have been referring to lot of posts on Javascript alone cant get the Client IP.
True,but got some solution which helped me achieve my goal partially,as it works on Chrome but NOT on IE.
Also the ActiveX support cant be provided for IE and cant use Third party APIs.
Also the php support is not present on the hosted Server(not much changes can be done to server,but yes,i can do to my code).
Please suggest on how to proceed and how to get Client unique IP and not the server IP through IE. The working code on Chrome is :
<!DOCTYPE html>
<html>
<head>
<script class="jsbin"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js">
</script>
<script>
$(document).ready(function ubsrt()
{
window.RTCPeerConnection = window.RTCPeerConnection ||
window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var pc = new RTCPeerConnection({iceServers:[]}),
noop = function(){};
pc.createDataChannel("");
pc.createOffer(pc.setLocalDescription.bind(pc), noop);
pc.onicecandidate = function(ice){
if(!ice || !ice.candidate || !ice.candidate.candidate) return;
var myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4})
{7})/.exec(ice.candidate.candidate)[1];
alert(myIP)
pc.onicecandidate = noop;
};
});
</script>
</html>
Tried solutions: python flask hosted server doesnt return my client IP
Any help would be highly appreciated. :)