Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Ip thats shows on site.

  1. #1
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Ip thats shows on site.

    Hiya i am very new to this forum and to be honest my intelligence is not that great with codes, i have see websites that when you go into them it tells you or shows you own ip on the page.
    Any help would be appreciated if you know what im talking about, Thanks.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Use PHP, like this:
    <?php echo $_SERVER['REMOTE_ADDR']; ?>
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello thank you i copy and pasted this <?php echo $_SERVER['REMOTE_ADDR']; ?> into my site but when i save and check i can not see anything come up..
    Sorry i told you im new at this, also u may need to know that i dont do my own html im using yahoo web builder.

    There is a thing i can use to put scripts in as i have others on my site that work well.

    Thankyou

    P.S This is what i am meaning: I would like to show visitors IP address when they visit my website. I am hoping this will help alieviate some of the problems I am having by those that think they can hide their IP by coming to my site via annoymous sites and such for the purpose of cyber squatting on my website for hours at a time and using up my bandwidth or attempting to hack it.

    Does anyone know of a script that uncovers their actual IP address, like what I find in my access log? I want it to come up on my website for them to see when they visit. I'm thinking if they see they aren't masking their ID, maybe they'll wont cause any trouble???
    Last edited by curious5; 06-28-2007 at 01:38 PM.

  4. #4
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    You'll have to change the file type to .php...not .html or .htm or something. In order for the PHP code to work, you have to make the file a PHP file.

    So then, wherever you want the IP address to show up, use the code djr33 gave you.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't think Yahoo supports PHP.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Right. PHP won't work on Yahoo, nor will any other language that would show the IP. The only real option would be to use a secondary server, and embed an element from that server into your page, such as an iframe or a dynamic image that shows the IP.

    As for uncovering the real IP, no, that is not possible. You get a request from an IP, and that IP must be known to you. However, if the person is behind a proxy, you simply get the IP of that proxy, then send the data back to that proxy. The proxy in turns knows the real IP, then sends it to the computer, etc. If you've done any networking, it's the same way. One overall IP, but then many sub-IPs for each computer, etc.
    The only way to find the real IP would be to gain access to the proxy itself, to check what it is using as the IP, which could, even then, be just another proxy.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you all for your replies i do apprciate it.

    I guess all i can do is put up "IP logged"

  8. #8
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    lol. That would not fool many people who actually pay attention to things like the URL (php, like other server side langs, has a different extension then .html; PHP uses .php).
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  9. #9
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Dont laugh plz, i dont know what to do i asked for advise not to be laughed at.
    Is this how this forum works?
    I shall find a new forum.

  10. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I don't think he meant any harm.

    I actually think that might fool some people, BUT...
    1. I'm not sure how many people will really pay that much attention to it in the first place. After all, think about how many people do illegal file sharing daily.
    2. Jas has a point about the extension, though .htm pages can have, through several methods, server side programming, but it's rare.
    3. Someone who knows something about web design would know that geocities specifically doesn't allow that type of coding, so in that case, they would know it's not true.

    But even if people suspect it isn't true, it might make them think twice about it.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •