Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Aug 2007
    Posts
    192
    Tokens
    3,120

    Latest Awards:

    Default Display page viewers ip script?

    Hey! I need a script for my website that displays the viewers IP, any know scripts? I have googled it numerous times.
    www.habbmania.co.uk >> Send me a pm if you need a habbo fansite job!


    Check out some of my videos!

  2. #2
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    PHP Code:
    <?=$_SERVER["REMOTE_ADDR"]; ?>

  3. #3
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Quote Originally Posted by Blob View Post
    PHP Code:
    <?=$_SERVER["REMOTE_ADDR"]; ?>
    Not sure if that displays the IP... probably does though. If I were to do it, I'd do it like this:

    PHP Code:
     <?
    $ip 
    $_SERVER["REMOTE_ADDR"]; 
    echo 
    $ip;
    ?>
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  4. #4
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Both are correct.

    I recommend you Guy's one though

    PHP Code:
    <?php
    $ip 
    $_SERVER['REMOTE_ADDR'];
    echo(
    $ip);
    ?>


  5. #5
    Join Date
    Aug 2007
    Posts
    192
    Tokens
    3,120

    Latest Awards:

    Default

    Quote Originally Posted by iUnknown View Post
    Not sure if that displays the IP... probably does though. If I were to do it, I'd do it like this:

    PHP Code:
     <?
    $ip 
    $_SERVER["REMOTE_ADDR"]; 
    echo 
    $ip;
    ?>
    None of these are working, I think you have made that code wrong aswell.

    The code should be:[php] <?php
    $ip = $_SERVER["REMOTE_ADDR"];
    echo $ip;
    ?>

    Any other ways?
    www.habbmania.co.uk >> Send me a pm if you need a habbo fansite job!


    Check out some of my videos!

  6. #6
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    I used this on one of my sites and works perfectly:

    PHP Code:
    <?php

    echo("Your IP address:<br />");
    echo(
    $_SERVER['REMOTE_ADDR']);

    ?>


  7. #7
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Use mine if you have short tags enabled.

  8. #8
    Join Date
    Aug 2007
    Posts
    192
    Tokens
    3,120

    Latest Awards:

    Default

    Quote Originally Posted by L?KE View Post
    I used this on one of my sites and works perfectly:

    PHP Code:
    <?php

    echo("Your IP address:<br />");
    echo(
    $_SERVER['REMOTE_ADDR']);

    ?>
    Just tried this on my site and it comes up with this where i wanted it:

    OMG! It's habbMANIA V1! Don't go away! "); echo($_SERVER['REMOTE_ADDR']); ?>
    www.habbmania.co.uk >> Send me a pm if you need a habbo fansite job!


    Check out some of my videos!

  9. #9
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by samuelb07 View Post
    Just tried this on my site and it comes up with this where i wanted it:

    OMG! It's habbMANIA V1! Don't go away! "); echo($_SERVER['REMOTE_ADDR']); ?>
    Dont use short opening tags


    PHP Code:
    <?php
    echo "Your IP Address is:";
    echo 
    "($SERVER['REMOTE_ADDR'])";
    ?>
    Lets set the stage on fire, and hollywood will be jealous.

  10. #10
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Orr..

    Save bw and just do

    PHP Code:
    <?php
    echo($_SERVER["REMOTE_ADDR"]);
    ?>
    ...

    And is the file extension definately .php?
    Coming and going...
    Highers are getting the better of me

Page 1 of 2 12 LastLast

Posting Permissions

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