Jump to content

Postback Coding


MDizzleFresh

Recommended Posts

Hello everyone. I am starting up a Facebook app, and I need help with coding the postback URL for my Super Rewards account. If someone can help me, please do! I have no clue how to even make the postback url page. I coded a php page, and uploaded it to my server, but the postback does not work. If someone can help me, or provide example postback codes, then it would be of great help!

Link to comment
https://forums.phpfreaks.com/topic/196683-postback-coding/
Share on other sites

The points aren't being added to the account... Here is the new code I have:

 

<?

include("includes/clsGeneral.php");

 

//check md5

$SECRET = '**************************';

$sig = md5($_REQUEST['id'] . ':' . $_REQUEST['new'] . ':' . $_REQUEST['uid'] . ':' .

$SECRET);

 

if($_REQUEST['sig'] == $sig) {

$userdata = GetUserInfo($_REQUEST['uid']);

$conn = ConnectDB();

$res = mysql_query('UPDATE users SET king_author_points = '.$_REQUEST['total'].' WHERE id = '.$_REQUEST['uid'].''. $connection);

if($res){

print "1";

    }else{

print "0";

}

    }else{

print "0";

}

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/196683-postback-coding/#findComment-1032651
Share on other sites

<?
include("includes/clsGeneral.php");

//check md5
$SECRET = '**************************';
$sig = md5($_REQUEST['id'] . ':' . $_REQUEST['new'] . ':' . $_REQUEST['uid'] . ':' .
$SECRET);

$DEBUG=1;
if ($DEBUG == 1) { echo "REQUEST: $_REQUEST['sig'] == $sig ? <br>\n"; }
if($_REQUEST['sig'] == $sig) {
   $userdata = GetUserInfo($_REQUEST['uid']);
   if ($DEBUG == 1) { echo "USERDATA: $userdata <br>\n"; }
   $conn = ConnectDB();
   $sql='UPDATE users SET king_author_points = '.$_REQUEST['total'].' WHERE id = '.$_REQUEST['uid'].''. $connection;
   if ($DEBUG == 1) { echo "SQL: $sql <br>\n"; }
   $res = mysql_query($sql);
   if($res){
      print "1";
       }else{
      print "0";
   }
    }else{
      print "0";
   }



this way you will see some values on your screen or in your browser when thing are posted back.

after testing you can change $DEBUG=1 to  $dDEBUG=0, to stop debugging.....

Link to comment
https://forums.phpfreaks.com/topic/196683-postback-coding/#findComment-1032689
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.