Thread: Check if voted on TopList

Results 1 to 1 of 1
  1. #1 Check if voted on TopList 
    Administrator

    Kevy's Avatar
    Join Date
    Jul 2006
    Posts
    1,428
    Thanks given
    204
    Thanks received
    1,905
    Rep Power
    5000
    You have implented rewards system on your server. So how to check if user has voted on Rune-Server TopList?

    Easy!

    Solution 1(Ip check):

    Code:
    <?php
    
    $serverid = 1; // This is your server id, you need to change this value!!!
    
    if(file_get_contents("http://www.rune-server.org/toplist.php?do=hasvoted&sid=" . $serverid . "&ip=" . $_SERVER['REMOTE_ADDR']) == "true")
      echo "User has voted.";
    else
      echo "User has not voted.";
      
    ?>
    Solution 2(Incentive postback):

    You specify postback url in TopList.
    Example:
    Code:
    http://www.yoursite.com/postback.php?data=
    When linking your player to vote, you include 'incentive' variable with id, hash, ip or whatever you like.

    Code:
    http://www.rune-server.org/toplist.php?do=vote&sid=yourserverid&incentive=idorhash
    You will receive HTTP GET request when player votes.

    Code:
    http://www.yoursite.com/postback.php?data=idorhash
    Thanks, Kevin.
    Reply With Quote  
     



Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. '10 people have now voted' message[PI]
    By All3n in forum Snippets
    Replies: 10
    Last Post: 06-21-2013, 03:38 AM
  2. toplist ip voted check
    By Spooky in forum Suggestions
    Replies: 1
    Last Post: 12-22-2012, 06:57 PM
  3. If you voted for him!
    By Snow Cat123 in forum Music
    Replies: 0
    Last Post: 10-21-2010, 09:53 PM
  4. Awesome math site! Voted #1! 1-10th grade!
    By tonypker13 in forum Homework
    Replies: 8
    Last Post: 10-31-2008, 03:32 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •