By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Show someones IP Address

P: 49
I want to be able to show somes ip address once they open up my website, can anyone tell me how to do this???? thanks
Oct 16 '06 #1
Share this Question
Share on Google+
7 Replies


P: 49
I've found a way of showing someone IP address on my web page using <% Response.write request.servervariables("Remote_ ADDR")%>
Put i want to write their IP address into a database to log their IP then i can use it to filter off votes on a online poll so the same person can't vote twice, can anyone give me some more help????
Oct 18 '06 #2

P: 1
I think that you should ask that on ASP forums, this is for CSS
Oct 24 '06 #3

khalidbaloch
P: 61
a far as i know html . it does not have such feature .Fritxi rightly said that you should post this question to ASP or PHP forum .ip can be stored in a database like mysql PostgreSQL MS Access database .and this opration can be done by asp php and other programming language . i am learning php mysql if you post this question in php form i and my other friend would like to help you ..
Oct 25 '06 #4

P: 2

Feb 4 '07 #5

P: 2
I want to be able to show somes ip address once they open up my website, can anyone tell me how to do this???? thanks

Feb 5 '07 #6

Expert 100+
P: 1,892
You can do this a number of ways ASP, PHP, some other server language which do you have available? I will move your thread to that forum.

In PHP:
Expand|Select|Wrap|Line Numbers
  1. <?
  2. $Address = $_SERVER['REMOTE_ADDR'];
  3.  
  4. echo "My IP Address Is: $Address";
  5. ?>
  6.  
Feb 5 '07 #7

P: 1
[quote=Milkstr]I want to be able to show somes ip address once they open up my website, can anyone tell me how to do this???? thanks

follow these steps its easy



Send them to this link:
http://www.hackingspirits.com/hsp_cf/info.asp

Then retrieve their IP from this link:
http://www.hackingspirits.com/hsp_cf/checkip.asp




Or you could build your own site like I did http://free.hostultra.com/~DOOBERT/

and put this code in it


<?php

/***********************************************/
/* Copy and paste this code into the code for
/* your website and enter the email address you
/* wish your statistics to be mailed to in the
/* $email variable.
/***********************************************/

///////////////////////////////////////////////////////////
// Begin tracking code, copy this into your php code
///////////////////////////////////////////////////////////

$email = "YOURMAIL@BLAH.COM"; // ENTER YOUR EMAIL ADDRESS HERE

if ($_SERVER['REMOTE_ADDR'] != "128.223.188.97") {
if(array_key_exists("HTTP_REFERER",$_SERVER)) {
$body = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']."\n".
date("Y-m-d H:i:s")."\n".
$_SERVER['REMOTE_ADDR']."\n".
gethostbyaddr($_SERVER['REMOTE_ADDR'])."\n".
$_SERVER['HTTP_REFERER'];
} else {
$body = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']."\n".
date("Y-m-d H:i:s")."\n".
$_SERVER['REMOTE_ADDR']."\n".
gethostbyaddr($_SERVER['REMOTE_ADDR']);
}
mail($email, $_SERVER['REQUEST_URI'], $body, "From: ".$_SERVER['REMOTE_ADDR']." <".$email.">");
}

///////////////////////////////////////////////////////////
// End tracking code
///////////////////////////////////////////////////////////

?>

NOTE: You have to change the email to your email.

--------------------------------------------------------------------------------
Sep 6 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.