Thread: Toplist callback

Results 1 to 2 of 2
  1. #1 Toplist callback 
    SOLUTIONS118 FOREVER

    Shaqattack118's Avatar
    Join Date
    Feb 2013
    Posts
    873
    Thanks given
    1,433
    Thanks received
    434
    Rep Power
    120
    The rune-server callback...
    When i enter the url, after someone votes it will go to it.. I get that and send the $_GET...
    BUT!
    In the code it has the If statement check
    Im wondering if rune-server automatically updates it every 12 hrs.. And makes people who voted more than 12 hours ago deleted from the database or w/e.. or if they have a date check on it or something
    Reply With Quote  
     

  2. #2  
    Registered Member Spectical's Avatar
    Join Date
    Jul 2013
    Posts
    45
    Thanks given
    0
    Thanks received
    1
    Rep Power
    12
    It would be really appreciated if Rune-Server actually updated and/or explained the callback correctly.

    There is a post from an administrator here if you go to "Add/Edit Your Server" on the toplist, it shows you the link, however it explains hardly anything. The guy that posted that should 1 update the message, and explain more, or simply have rune-server or have himself re-do the system. I made the RuneLocus callback work in 2 seconds, but Rune-Server I still have yet to figure out. He states there is two methods, IP check and Incentive. Well, first things first, when you go to vote, it should allow you to have an API or "special key" that helps prevent your votecallback.php from being exploited, thus allowing you to use an IP as well, but it doesn't work that way, it only returns the domainhere.com/votecallback.php?incentive=insentivehere. So when I went to add a hash value, I was like shit, that can get abused and exploited easily, so I added a time system, but it still doesn't work the way I need it. It works half the time. Rune-Server needs a way better callback system. Also, trying the first method, how does that even work, unless the person is redirected to the callbackURL, which still makes no sense cause how does it get back to rune-server? Just makes no sense.

    Someone else should explain a better callback system. Or help me with mine (rune-server wise)

    Here's what I go though, it might help you in the long run, or someone else cause this threads so old I bet you got it fixed already.

    Code:
    // Callback URL : http://example.com/VoteCallBack.php?api=CALL-BACK-API&data= [Works For Runelocus]
    // Above is what you would enter for RuneLocus's "Incentive" call back URL.
    // Callback URL: http://example.com/VoteCallBack.php
    // Above is what you would enter for Rune-Server's "Incentive" call back URL.
    
    if (!isset($_GET["api"]) && !isset($_GET["postback"])) {
    	die("Please insert an API code");
    } else if ($_GET["api"] != "API-CODE-HERE" && !isset($_GET["postback"])) {
    	die("Please enter a correct API key");
    } else if (!isset($_GET["data"]) && !isset($_GET["postback"])) {
    	die("There is currently no data");
    }
    
    $data = $_GET["data"];
    
    // Check Rune-Server Callback
    if (isset($_GET["postback"])) {
    
    	$id = $_GET["postback"];
    
    } else {
    
    	// Check RuneLocus Callback
    	if (strpos($data, "=") !== false) {
    		$explode = explode("=", $data);
    		$id = $explode[1];
    	} else {
    		$id = $data;
    	}
    
    }
    
    $result = $dbhM->query("SELECT * FROM `votecallback` WHERE `hash` = '".$id."' OR `ipAddr` = '".$id."'");
    $count = $dbhM->query("SELECT COUNT(*) FROM `votecallback` WHERE `hash` = '".$id."' OR `ipAddr` = '".$id."'");
    
    if ($count->fetchColumn() >= 1) {
    
    	if (isset($_GET["postback"])) {
    		foreach($result as $row) {
    			$called = $row["called"];
    			$until = $row["until"];
    			$add = ($called + 1);
    			$randHash = sha1(rand(1,2147000000));
    			$untilNow = (time() + 43200);
    			if ($until >= time()) {
    				die("You have already voted at Rune-Server");
    			} else {
    				$dbhM->query("UPDATE `votecallback` SET `called` = '".$add."', `hash` = '".$randHash."', `until` = '".$untilNow."' WHERE `hash` = '".$id."'");
    				die("updated");
    			}
    		}
    	} else {
    		foreach($result as $row2) {
    			$called = $row2["called"];
    			$add = ($called + 1);
    			$randHash = sha1(rand(1,2147000000));
    			$dbhM->query("UPDATE `votecallback` SET `called` = '".$add."', `hash` = '".$randHash."' WHERE `ipAddr` = '".$id."'");
    			die("updated");
    		}
    	}
    	
    } else {
    	die("Seems like you tried to trick the system ey? Too bad.");
    }
    No need to "ROFL" at the PHP either, if you do not think it's "up to standards" cause it was done quickly.
    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. CallBack Urls [ $ ]
    By Someone in forum Buying
    Replies: 2
    Last Post: 12-26-2012, 03:36 PM
  2. buy toplist
    By Romania Clan in forum Buying
    Replies: 3
    Last Post: 05-24-2011, 06:36 PM
  3. [Bug/Glitch] Toplist
    By kopjekoffiee in forum Defects
    Replies: 3
    Last Post: 05-08-2011, 03:13 PM
  4. Toplist
    By La Lampara in forum Forum Related Help
    Replies: 2
    Last Post: 03-14-2010, 02:11 PM
  5. Toplist
    By Sir Lethal in forum Chat
    Replies: 0
    Last Post: 10-18-2008, 08:06 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •