Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 9 of 9

Thread: Is this possible/good idea?

  1. #1

    Is this possible/good idea?

    I want to encourage my forum users to help in advertising my website. The general idea is they put a link on websites and i reward them for the number of hits through this link.

    The basis is they take the link and add their name to the end for example
    www.example.com/links.php?user=paul

    when someone comes to this link they are redirected to the main site and in sql paul gets 1 "click"


    There would need to be some control, such as IP filtering to stop someone cheating for example but in all would this be possible? and do you think its a good idea?
    Paul

  2. #2
    It would be possible. It would work well as long as people don't start spamming other sites, because then that makes you look bad.

  3. #3
    And I guess i can use site stat tools to determine if someone is abusing it or not and punish them!

    So assuming the theory whats the best way to do it? In your opinion?

    Thanks
    Paul

  4. #4
    What's the name of your site so we know the source to ban when they start spamming here
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  5. #5
    Do something like this (not tested at all):
    PHP Code:
    <?php

    $c 
    mysqli_connect('locahost''root''');
    mysqli_select('forum'$c);
    mysqli_query($c"UPDATE users SET referrels=referrels+1 WHERE username = " mysql_real_escape_string($_GET['user']));
    header"Location: http://www.domain.com/redirect-to-new-page.php" );
    die();
    ?>
    Last edited by blazes; November 12th, 2009 at 06:37 PM.

  6. #6
    Might want to do it by a hashed user id or something instead of the username, just so it doesn't look so obvious
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  7. #7
    Yeah, I'd at least use the user id instead of the user name, but he stated he wanted them to be able to do it themselves, and it'd be easier with the user name. Although it would be easy enough to add a link in the users control panel so they can just copy and paste it.

  8. #8
    Did you get inspired by this How to spam like a pro?
    "You are playing a very dangerous game"
    "Change always is"

    Creativo Development

  9. #9
    Wouldn't it be a simple thing to create a script which fetches the PHP site several times a minute, and since the site doesn't care what you do with the contents, and only that the PHP address was accessed, it wouldn't notice all those fetches.

    Perhaps you could have some sort of IP address lock that only let's each IP address click once every 24 hours. Don't tell users this limit is in place, but still log the excess hits, and if you see 100s of hits coming from 1 IP address, you know someone is trying to cheat the system.
    Blog article of the month: Why My One Line 'if' Statements Are Unusual
    Twitter: @IQAndreas
    GitHub: IQAndreas

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012