SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: The best way?

  1. #1
    SitePoint Addict Latox's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The best way?

    Visit http://www.youtubetomp3.net/

    Its a conversion tool, I want to make it so a guest can convert 5 videos, and then the form disappears and it displays "You must login to convert more videos"

    What would be the best way to do this?

    I can easily code the account backend, etc, but to display the form 5 times for a guest and then display a login message, what would be the best way? a session?

    Thanks.
    :-)

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cookie, unless it bothers you that they can clear the cookie and keep using it.

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Either way you go it can be circumvented unless you enforce user accounts.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #4
    SitePoint Addict Latox's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about if I log users IP and update IP converts per convert, if IP convert => 5, show login form?

    That way if they close browser, clear cookies, etc ..
    :-)

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An ip address is not unique to a persons computer. For example, when college students try to use the campus internet access...everyone will be blocked. I think this is a realistic problem for you, because it seems like the type of site where word of mouth could drive a spurt of traffic in a short period of time.

    ISPs often cycle ip addresses between users. Your ip right now, could be used by your neighbor in a minute.

    If you're still bent on using an ip, maybe consider only throttling uses per ip within a limited time period. Maybe use the user agent string + ip, which might help out a few users.

    But, considering someone might send automated submissions and hog your website service, at least blocking by ip would force them to use a proxy server, which would probably slow them down a lot.

  6. #6
    SitePoint Addict Latox's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I was thinking of using agent & ip, not sure though.

    I don't really mind if they can clear cookies to get around it, or close a session, etc.

    I just want to get a user database going, most people won't even know how to avoid it.
    :-)


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
  •