In the below code every frame is opening and IP is showing.
I was using VPN.
Is it possible to change ip without vpn?
Indeed, the country should not change.
please send me code how i can change each frame ip code?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="websiteurl.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
#iframeContainer { display: flex; flex-wrap: wrap; }
.iframeDiv { display: flex; flex-direction: column; margin-right: 10px; /* Optional: Adjust spacing between columns */ }
iframe { width: 500px; height: 300px; }
</style>
<script type="text/javascript">
function openIframeWithUrl() {
var urlTextbox = document.getElementById("urlTextbox");
var url = urlTextbox.value;
var iframeContainer = document.getElementById("iframeContainer");
// Create an iframe with the specified URL
var iframe = document.createElement("iframe");
iframe.src = url;
iframe.width = "500"; // Set the desired width
iframe.height = "300"; // Set the desired height
// Create a div for each iframe, its IP address, country, and region
var iframeDiv = document.createElement("div");
iframeDiv.className = "iframeDiv";
iframeDiv.appendChild(iframe);
// Get the client's IP address using JavaScript
fetch('https://api64.ipify.org?format=json')
.then(response => response.json())
.then(data => {
var clientIp = data.ip;
// Fetch location information based on the IP address
fetch('https://ipinfo.io/' + clientIp + '?token=d5669a8fa8bf14')
.then(response => response.json())
.then(info => {
var ipContainer = document.createElement("div");
ipContainer.innerHTML = "IP Address: " + clientIp;
iframeDiv.appendChild(ipContainer);
var countryContainer = document.createElement("div");
countryContainer.innerHTML = "Country: " + info.country;
iframeDiv.appendChild(countryContainer);
var regionContainer = document.createElement("div");
regionContainer.innerHTML = "Region: " + info.region;
iframeDiv.appendChild(regionContainer);
});
});
// Append the iframe and its IP address container to the main container
iframeContainer.appendChild(iframeDiv);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<label for="urlTextbox">Enter URL:</label>
<input type="text" id="urlTextbox" placeholder="https://www.example.com" />
<button type="button" onclick="openIframeWithUrl()">Open Iframe</button>
<div id="iframeContainer">
<!-- Iframes and their IP addresses will be added here dynamically -->
</div>
</div>
</form>
</body>
</html>