Show someones IP Address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Milkstr
    New Member
    • Sep 2006
    • 49

    Show someones IP Address

    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
  • Milkstr
    New Member
    • Sep 2006
    • 49

    #2
    I've found a way of showing someone IP address on my web page using <% Response.write request.serverv ariables("Remot e_ 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????

    Comment

    • Fritxi
      New Member
      • Oct 2006
      • 1

      #3
      I think that you should ask that on ASP forums, this is for CSS

      Comment

      • khalidbaloch
        New Member
        • Oct 2006
        • 61

        #4
        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 ..

        Comment

        • mali1257
          New Member
          • Feb 2007
          • 2

          #5

          Comment

          • mali1257
            New Member
            • Feb 2007
            • 2

            #6
            Originally posted by 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

            Comment

            • AricC
              Recognized Expert Top Contributor
              • Oct 2006
              • 1885

              #7
              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:
              Code:
              <?
              $Address = $_SERVER['REMOTE_ADDR'];
              
              echo "My IP Address Is: $Address";
              ?>

              Comment

              • serion18
                New Member
                • Sep 2007
                • 1

                #8
                [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.hackingspir its.com/hsp_cf/info.asp

                Then retrieve their IP from this link:
                http://www.hackingspir its.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_ex ists("HTTP_REFE RER",$_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.

                --------------------------------------------------------------------------------

                Comment

                Working...