[PHP] IP Grabbing Script [SCRIPT]

Discussion in 'Web Programming' started by Hax4You, Mar 16, 2007.

[PHP] IP Grabbing Script [SCRIPT]
  1. Unread #1 - Mar 16, 2007 at 1:47 PM
  2. Hax4You
    Joined:
    Feb 2, 2007
    Posts:
    741
    Referrals:
    0
    Sythe Gold:
    0

    Hax4You Apprentice

    [PHP] IP Grabbing Script [SCRIPT]

    For those of you who just know how to copy + paste PHP scripts to your site, here is a basic script that'll show someones IP, as IPchicken, etc. does.

    PHP:
       <?php
     
    $ip 
    $_SERVER['REMOTE_ADDR'];
    echo 
    "Your ip is: $ip";
    ?> 
    Enjoy :)
     
  3. Unread #2 - Mar 16, 2007 at 4:59 PM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] IP Grabbing Script [SCRIPT]

    edit: Double post.
     
  5. Unread #3 - Mar 16, 2007 at 5:00 PM
  6. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] IP Grabbing Script [SCRIPT]

    It won't work on most server configurations. You have to concatenate your variables, or else it'll show your ip as $ip.

    <?php

    $ip = $_SERVER['REMOTE_ADDR'];
    echo "Your ip is: ".$ip." .";
    ?>

    Just wanted to point it out. It might work on yours, but not most.
     
  7. Unread #4 - Mar 17, 2007 at 2:36 AM
  8. T-Trader
    Joined:
    Mar 15, 2007
    Posts:
    92
    Referrals:
    0
    Sythe Gold:
    0

    T-Trader Member

    [PHP] IP Grabbing Script [SCRIPT]

    This is just a newbie version of an ip grabbing script, this totally ignores if the user is using a proxy server or not.
     
  9. Unread #5 - Mar 17, 2007 at 10:48 AM
  10. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] IP Grabbing Script [SCRIPT]


    Newbie version? I think you mean basic. There is no fool-proof method of detecting whether you're behind a proxy or not, and if you have one, then show it; if you don't, you have no right to call it newbie.
     
  11. Unread #6 - Mar 17, 2007 at 10:54 AM
  12. SidStudios
    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0

    SidStudios Active Member

    [PHP] IP Grabbing Script [SCRIPT]

    On most, "Your ip is: $ip ."; will work.

    Maybe on older versions of PHP, it will not.
    But, it is always needed to do
    "Your ip is: ".$ip." ."
    if you are using fwrite("Your ip is: ".$ip." ." , $stream);
     
  13. Unread #7 - Mar 17, 2007 at 9:00 PM
  14. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] IP Grabbing Script [SCRIPT]

    It won't work on most. I forgot the value in php.ini, but it's set false by default, so no, it won't work on most.
     
  15. Unread #8 - Mar 18, 2007 at 1:22 PM
  16. SidStudios
    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0

    SidStudios Active Member

    [PHP] IP Grabbing Script [SCRIPT]

    I've deleted php.ini and it works as usual. But on GoDaddy's servers, who knows what will happen? :p
     
  17. Unread #9 - Mar 18, 2007 at 9:53 PM
  18. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] IP Grabbing Script [SCRIPT]

    php.ini is just for extra modifications, etc. If you delete it, I believe it'll run from the default configurations.
     
  19. Unread #10 - Mar 18, 2007 at 9:56 PM
  20. Hax4You
    Joined:
    Feb 2, 2007
    Posts:
    741
    Referrals:
    0
    Sythe Gold:
    0

    Hax4You Apprentice

    [PHP] IP Grabbing Script [SCRIPT]

    Yup.

    Also, another thing.

    How is an IP grabbing script going to get past a proxy?
    The only other thing to do would be making a script to block proxy(s) from accessing your site.
     
  21. Unread #11 - Mar 18, 2007 at 10:22 PM
  22. Cheeter
    Joined:
    Jun 5, 2005
    Posts:
    3,851
    Referrals:
    1
    Sythe Gold:
    31
    Discord Unique ID:
    236215891849641985
    Discord Username:
    Charkel#8050
    Extreme Homosex Homosex

    Cheeter Grand Master
    Cheetah Retired Global Moderator

    [PHP] IP Grabbing Script [SCRIPT]

    You could make a small java applet :p I think java works on your real ip instead of the proxy ip. (Atleast the rs applet does)
     
  23. Unread #12 - Mar 19, 2007 at 3:35 PM
  24. Hax4You
    Joined:
    Feb 2, 2007
    Posts:
    741
    Referrals:
    0
    Sythe Gold:
    0

    Hax4You Apprentice

    [PHP] IP Grabbing Script [SCRIPT]

    Not using a Java Applet, how about making a PHP script that can do that
    :p
     
  25. Unread #13 - Mar 19, 2007 at 4:00 PM
  26. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] IP Grabbing Script [SCRIPT]

    Java doesn't do it automatically. All scripting/programming languages just give what they have, which is your IP (or your proxies' ip), but you have to go the extra step yourself to make it get the actual IP address, which is what runescape does.
     
< Test Scripts | I don't know what this code's for >

Users viewing this thread
1 guest


 
 
Adblock breaks this site