SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Oct 2000
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    On my site you can vote for games...and some little puke keeps view the source and manually entering a # for voting. I changed my PHP to make it so the # is 1-10 (ya, I know...I should have before) How can I log an IP or SOMETHING when the guy tried to enter an incorrect # again.
    http://gamesdex.com

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $log_file "/var/log/vote_ip_log";
    $number int($number);

    if(
    $number || $number 10# $number=whatever var you use for the number...

    system("echo $REMOTE_ADDR >> $log_file"); # this logs their IP and appends it to the end of $log_file

    That should work...but I haven't tested it.

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2000
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great! Where is the log file saved?

  4. #4
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the answer is readable in the HTML/javascript source code then ... no special hack involved
    Last edited by Michel V; May 6, 2001 at 14:05.
    [blogger: zengun] [blogware contributor: wordpress]

  5. #5
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The log file is whatever filename is in the variable $log_file. Read the code's comments for more info

  6. #6
    SitePoint Zealot
    Join Date
    Oct 2000
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm...didn't seem to work...

  7. #7
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure the specfied path and file name exists.

  8. #8
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only bad news is IP may not be that much help. Many local ISP's, like my own, give me a different IP each time I log online. I was going to use IP for a ban list, but the more I thought about it...

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  9. #9
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ronnie, well not so actually. The ISP will know who was using what ip at what time. At the end of the day you need to law enforcement agencies cooperation (thus getting the isp's cooperation) or the ISP themselves to cooperate to take matters much further.
    Anyway sammy i dont really think that should be called a hack and i dont see what you would do with their ip. Since they are obviously not breaking any laws Tell their mummy? ...unless there are new laws regards the reading of HTML code in which case im going down!

    Cheers
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  10. #10
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would assume that he is going in a reading the variable names and then passing the appropriate variables through a url. Go to the script that processes the ratings and add code to get the url used to get to that page. If it has variables in it, i.e. is not the correct url then have the script not process the info.

    In otherwords

    If ($url != "http://gamesdex.com/rategame.php" || $url != "http://www.gamesdex.com/rategame.php") {
    break;
    }
    Marty H.

  11. #11
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mad,

    That was kinda my point, yes it could be tracked if this was a major hack or such. But he's just trying to stop a dork from messing up his poll.. I guess I meant if he starts blocking by IP, he could be locking out legit surfers who were only unlucky to get the IP after this person messed with the site. I myself could use a banning system, but IP is not the way to go.

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.


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
  •