2 Replies - 1094 Views - Last Post: 24 September 2008 - 11:10 AM

#1 mahendra_22patil  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 17
  • Joined: 15-August 08

how i get ip address of server in .htm file

Posted 21 September 2008 - 11:51 PM

hii
friend
my file will be save in .htm file i want IP address of server .


following are code

<html>
	<head>
		<title>TATA Power Calendar</title>
	</head>
	
	<link href="http://IP address/infodisplay/www/styles/ctc.css" rel="stylesheet" type="text/css"/>
		<script language="javascript" src="http://IP address/infodisplay/www/js/codethatcalendarstd.js"></script>

	<body>
		<script>
			if(!window.opener)window.opener=window.parent;
			if(window.opener && window.opener.codethatcalendar)  
			{	   document.write("<div class='clsBody'>")
				window.opener.codethatcalendar.create(document);
				document.write("</div>")
			}
		</script>
	</body>
</html>



how to i get IP address in program please help me............

** Edit ** :code:

Is This A Good Question/Topic? 0
  • +

Replies To: how i get ip address of server in .htm file

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5365
  • View blog
  • Posts: 27,328
  • Joined: 10-May 07

Re: how i get ip address of server in .htm file

Posted 21 September 2008 - 11:55 PM

View Postmahendra_22patil, on 22 Sep, 2008 - 02:51 AM, said:

my file will be save in .htm file i want IP address of server .


If you want the ip address of the server, you can just use nslookup (or other dns tools). I'm not sure why does the html care what the ip of the server is?
Was This Post Helpful? 0
  • +
  • -

#3 EvilReaper  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-September 08

Re: how i get ip address of server in .htm file

Posted 24 September 2008 - 11:10 AM

View Postmahendra_22patil, on 21 Sep, 2008 - 11:51 PM, said:

hii
friend
my file will be save in .htm file i want IP address of server .


following are code

<html>
	<head>
		<title>TATA Power Calendar</title>
	</head>
	
	<link href="http://IP address/infodisplay/www/styles/ctc.css" rel="stylesheet" type="text/css"/>
		<script language="javascript" src="http://IP address/infodisplay/www/js/codethatcalendarstd.js"></script>

	<body>
		<script>
			if(!window.opener)window.opener=window.parent;
			if(window.opener && window.opener.codethatcalendar)  
			{	   document.write("<div class='clsBody'>")
				window.opener.codethatcalendar.create(document);
				document.write("</div>")
			}
		</script>
	</body>
</html>



how to i get IP address in program please help me............

** Edit ** :code:


just use php
examples:
<?php echo $_SERVER['SERVER_ADDR']; ?>
or <?php $ip = gethostbyname('www.google.com');
echo $ip; ?>
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1