Thread: [317] motivote callbacks

Results 1 to 9 of 9
  1. #1 [317] motivote callbacks 
    Registered Member
    Join Date
    Nov 2015
    Posts
    28
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    So i've done the callback URL on all the sites, I've matched the Vote ID URLs.
    Yet not one of the sites clears on the script (turns green and allows you to move to reward choice)
    This is what happens when i type in my callback URL
    Screenshot by Lightshot

    Here's the code from motivote script file callback.php, do I need to change anything to not get "invalid callback"
    Code:
    <?php
    require('init.php');
    $auth = false;
    $data = '';
    
    if (count($_GET) > 0) {
    	// scan get and post variables for our incentive string
    	foreach ($_GET as $key => $value) {
    		$auth = mv_incentive_array($value);
    		
    		if (is_array($auth)) {
    			break;
    		}
    	}
    	
    	foreach ($_POST as $key => $value) {
    		$auth = mv_incentive_array($value);
    		
    		if (is_array($auth)) {
    			break;
    		}
    	}
    	
    	// if we found it in our get/post then go ahead and process it.
    	if (is_array($auth)) {
    		if ($auth['hash'] != $mvsecurityhash) {
    			die('Invalid hash.');
    		}
    		
    		//print_r($auth);
    		$res = mv_update_vote(intval($auth['id']), $_SERVER['REMOTE_ADDR'], json_encode($_GET).json_encode($_POST));
    		
    		if (!$res) {
    			echo('Fail. Query issue.');
    		}
    		else {
    			echo('Success!');
    		}
    	}
    	else {
    		echo('Invalid callback.');
    	}
    }
    Reply With Quote  
     

  2. #2  
    Registered Member JavaD0x's Avatar
    Join Date
    Jul 2011
    Posts
    78
    Thanks given
    8
    Thanks received
    7
    Rep Power
    11
    - didn't read code properly, not relevant -
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2015
    Posts
    28
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by JavaD0x View Post
    Looks like you're not actually getting the callback id from the URL.
    Change the code to this:

    Code:
    <?php
    require('init.php');
    $auth = false;
    $data = '';
    
    if (count($_GET["i"]) > 0) {
    	// scan get and post variables for our incentive string
    	foreach ($_GET as $key => $value) {
    		$auth = mv_incentive_array($value);
    		
    		if (is_array($auth)) {
    			break;
    		}
    	}
    	
    	foreach ($_POST as $key => $value) {
    		$auth = mv_incentive_array($value);
    		
    		if (is_array($auth)) {
    			break;
    		}
    	}
    	
    	// if we found it in our get/post then go ahead and process it.
    	if (is_array($auth)) {
    		if ($auth['hash'] != $mvsecurityhash) {
    			die('Invalid hash.');
    		}
    		
    		//print_r($auth);
    		$res = mv_update_vote(intval($auth['id']), $_SERVER['REMOTE_ADDR'], json_encode($_GET["i"]).json_encode($_POST["i"]));
    		
    		if (!$res) {
    			echo('Fail. Query issue.');
    		}.
    		else {
    			echo('Success!');
    		}
    	}
    	else {
    		echo('Invalid callback.');
    	}
    }
    It looks like your $_GET wasn't set.

    Changed:

    Code:
     if ($_GET > 0) {
    
    $res = mv_update_vote(intval($auth['id']), $_SERVER['REMOTE_ADDR'], json_encode($_GET).json_encode($_POST));
    To:

    Code:
     if ($_GET["i"] > 0) {
    
    $res = mv_update_vote(intval($auth['id']), $_SERVER['REMOTE_ADDR'], json_encode($_GET["i"]).json_encode($_POST["i"]));
    Read:

    PHP $_GET
    Thanks for your reply I'm kinda scratching my head if it's really that easy of a fix because why would he release this if it was missing that, i mean if it does fix it i'm not complaining! but you think there could be anything else to it?
    I will try it out!
    Reply With Quote  
     

  4. #4  
    Registered Member JavaD0x's Avatar
    Join Date
    Jul 2011
    Posts
    78
    Thanks given
    8
    Thanks received
    7
    Rep Power
    11
    Quote Originally Posted by LegendsTurmoil View Post
    Thanks for your reply I'm kinda scratching my head if it's really that easy of a fix because why would he release this if it was missing that, i mean if it does fix it i'm not complaining! but you think there could be anything else to it?
    I will try it out!


    Try it out and let me know, i'm not 100% myself!
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2015
    Posts
    28
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by JavaD0x View Post
    Try it out and let me know, i'm not 100% myself!
    unfortunately it did not change the scenario
    Reply With Quote  
     

  6. #6  
    Registered Member JavaD0x's Avatar
    Join Date
    Jul 2011
    Posts
    78
    Thanks given
    8
    Thanks received
    7
    Rep Power
    11
    I've just realised i'm on completely the wrong track. Ignore my responses! Haha sorry!
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Nov 2015
    Posts
    28
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by JavaD0x View Post
    I've just realised i'm on completely the wrong track. Ignore my responses! Haha sorry!
    wait what ?
    any other clues?
    Reply With Quote  
     

  8. #8  
    Boy Wonder


    Join Date
    Mar 2012
    Posts
    849
    Thanks given
    139
    Thanks received
    80
    Rep Power
    99
    post init.php

    Reply With Quote  
     

  9. #9  
    Middleman Services
    Louis Vuitton's Avatar
    Join Date
    Oct 2014
    Posts
    491
    Thanks given
    53
    Thanks received
    66
    Rep Power
    30
    add me on skype i will help @ deathreborn3
    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. [317] motivote callbacks
    By Wolf Scape in forum Help
    Replies: 1
    Last Post: 11-12-2015, 06:01 AM
  2. [317] Need help setting up Motivote!
    By Wolf Scape in forum Help
    Replies: 0
    Last Post: 11-08-2015, 06:47 AM
  3. 317 PI motivote
    By janceboy in forum Buying
    Replies: 1
    Last Post: 08-18-2015, 11:32 AM
  4. Motivote callbacks
    By Mr Joopz in forum Help
    Replies: 2
    Last Post: 03-29-2015, 07:45 PM
  5. 317 GTL VOTE callback
    By _Patrick_ in forum Help
    Replies: 8
    Last Post: 02-14-2014, 09:00 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
  •