...

View Full Version : Need Help And Fast With Referral Script!



Lanibox
11-05-2010, 07:56 PM
Hi... I bought this script from http://cparafflescript.com they haven't answer me now in 2 days.

I have allready send message to godaddy technical support and they say that problem isnt on their system... But yeah, this is my problem



Go to "invite friends" and click your referral link and you see problem. It gives 404.

Here is invite.php which should register every user to database + give their referral link.


<?php
require_once 'appinclude.php';
require_once 'mystyle.php';

echo '<div align="center"><img src="'.$appcallbackurl.'main.png" width="300" height="150"></div>';

require_once 'ads/topads.php';
?>

<fb:tabs>
<fb:tab-item href='<? echo $appCanvasUrl; ?>' title='Raffle' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>earn.php' title='Get Tickets' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>payment.php' title='Payment Info' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>history.php' title='Raffle History' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>forum.php' title='Forum' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>invite.php' title='Invite Friends' selected='true' />
</fb:tabs>
<div align="center">
<?
$fbid = $facebook->require_login();
$theirip = $_SERVER['REMOTE_ADDR'];


if ($fbid == "")
{
?>
<fb:error message="We cannot determine your Facebook User ID. This is necessary for this app to function. Try refreshing this page. (it happens from time to time)" />
<?
die("&nbsp;");
} else {
// nothing
}

?>

<?
$count = mysql_num_rows(mysql_query("SELECT id FROM main WHERE fbuser='$fbid' LIMIT 1"));

if ($count == "1")
{
// user exists
} else {
// new user, welcome, insert
mysql_query("INSERT INTO main (fbuser, theip) VALUES ('$fbid', '$theirip')");
?>
<script type="text/javascript">
<!--

showDialog('Welcome to the Raffle! To enter the raffle (with REAL CASH PRIZES), you need tickets! Earn your tickets, then enter them in the raffles you choose! Good luck!');

function showDialog(dlgStr){
var myDialog = new Dialog(Dialog.DIALOG_POP);
myDialog.oncancel = handleCancel;
myDialog.showMessage('Aloha!', dlgStr, button_confirm='Cancel');
return false;
}


function handleCancel(evt){
return true;
}

//-->
</script>
<br>
<fb:success message="You have successfully been registered with our network!" /><br>
<?
}
?>

<?

$mesult = mysql_query("SELECT * FROM main WHERE fbuser='$fbid'")
or die(mysql_error());

while($tow = mysql_fetch_array( $mesult )) {

$ppal = $tow['paypal'];
$isverr = $tow['isverified'];
$idyy = $tow['id'];
}

?>
<fb:dialog id="my_dialog" cancel_button=1> <fb:dialog-title>Referred Friends</fb:dialog-title> <fb:dialog-content><form id="my_form">
<?
$desult = mysql_query("SELECT * FROM main WHERE theref='$idyy'")
or die(mysql_error());

while($tdw = mysql_fetch_array( $desult )) {

$thafbee = $tdw['fbuser'];
$thaact = $tdw['activerefs'];
$thacompo = $tdw['compoffers'];

if ($thaact == "1")
{
$iliketurtles = "<font color='green'>ACTIVE</font>";
} else {
$iliketurtles = "<font color='red'>NOT YET ACTIVE</font>";
}
?>

<fb:name uid="<? echo $thafbee; ?>" /> (<a href="http://www.facebook.com/profile.php?id=<? echo $thafbee; ?>"><? echo $thafbee; ?></a>) - <? echo $iliketurtles; ?><br>
<?
}
?>
</form></fb:dialog-content></fb:dialog>
<?
$xount = mysql_num_rows(mysql_query("SELECT id FROM main WHERE theref='$idyy'"));
$xxount = mysql_num_rows(mysql_query("SELECT id FROM main WHERE theref='$idyy' AND activerefs='1'"));

echo "<br><font size='4'>Refer Friends to the Raffle!</font><br>
For every 5 friends you refer, <b>you get 1 free raffle ticket</b>!*<br><br><br>
<font size='4'>Your Referral URL:</font><br>
<a href='$appCanvasUrl$idyy'><font size='3'>$appCanvasUrl$idyy</font></a><br><br><font size='5'>You have referred <b><a href='#' clicktoshowdialog='my_dialog'>$xount</a></b> friends, <b>$xxount</b> of which are active users!</font><br><br><br>* = an Active referral is someone who adds our application from your Referral URL, and completes atleast 1 offer to earn tickets. You get 0.2 tickets per active referral (1 ticket for every 5 active referrals!)<br><hr><br><br>";
?>
<font size="4">Let us help!</font><br>
Simply click on any online friend below to send them a pre-made message with your referral URL (feel free to edit it)!<br><br>
<fb:chat-invite msg="check out the Facebook Raffle (current prize: $25, free to join) <? echo $appCanvasUrl; ?><? echo $idyy; ?>" condensed="false" /><br><br>
</div>

<div class=whiteBox>
<?php require_once 'ads/bottomads.php'; ?>

</div>

</div>



Some things you should mayby know.

$appCanvasUrl is masked as apps.facebook.com/theautolotto/

I have no idea what there is wrong. Can anybody help me?

myfayt
11-05-2010, 08:39 PM
Your hosting company (godaddy) has nothing to do with anything other than hosting your site.

MattF
11-06-2010, 03:36 PM
For others who may face the same problem in the future, the cure was?

ppstars
04-16-2011, 07:37 PM
I believe your script only work for Facebook, because you said [$appCanvasUrl is masked as apps.facebook.com/theautolotto/] i believe this is an FBML or something else in the facebook application page which is using iframe on the page!

Somthing like this page on facebook (http://www.facebook.com/pages/Menjadi-Nomor-Satu/191436974232311?sk=app_106878476015645&app_data=page-1) or you can build an application here (http://www.facebook.com/apps/application.php?id=7503211727)


Hi... I bought this script from http://cparafflescript.com they haven't answer me now in 2 days.

I have allready send message to godaddy technical support and they say that problem isnt on their system... But yeah, this is my problem



Go to "invite friends" and click your referral link and you see problem. It gives 404.

Here is invite.php which should register every user to database + give their referral link.


<?php
require_once 'appinclude.php';
require_once 'mystyle.php';

echo '<div align="center"><img src="'.$appcallbackurl.'main.png" width="300" height="150"></div>';

require_once 'ads/topads.php';
?>

<fb:tabs>
<fb:tab-item href='<? echo $appCanvasUrl; ?>' title='Raffle' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>earn.php' title='Get Tickets' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>payment.php' title='Payment Info' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>history.php' title='Raffle History' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>forum.php' title='Forum' />
<fb:tab-item href='<? echo $appCanvasUrl; ?>invite.php' title='Invite Friends' selected='true' />
</fb:tabs>
<div align="center">
<?
$fbid = $facebook->require_login();
$theirip = $_SERVER['REMOTE_ADDR'];


if ($fbid == "")
{
?>
<fb:error message="We cannot determine your Facebook User ID. This is necessary for this app to function. Try refreshing this page. (it happens from time to time)" />
<?
die("&nbsp;");
} else {
// nothing
}

?>

<?
$count = mysql_num_rows(mysql_query("SELECT id FROM main WHERE fbuser='$fbid' LIMIT 1"));

if ($count == "1")
{
// user exists
} else {
// new user, welcome, insert
mysql_query("INSERT INTO main (fbuser, theip) VALUES ('$fbid', '$theirip')");
?>
<script type="text/javascript">
<!--

showDialog('Welcome to the Raffle! To enter the raffle (with REAL CASH PRIZES), you need tickets! Earn your tickets, then enter them in the raffles you choose! Good luck!');

function showDialog(dlgStr){
var myDialog = new Dialog(Dialog.DIALOG_POP);
myDialog.oncancel = handleCancel;
myDialog.showMessage('Aloha!', dlgStr, button_confirm='Cancel');
return false;
}


function handleCancel(evt){
return true;
}

//-->
</script>
<br>
<fb:success message="You have successfully been registered with our network!" /><br>
<?
}
?>

<?

$mesult = mysql_query("SELECT * FROM main WHERE fbuser='$fbid'")
or die(mysql_error());

while($tow = mysql_fetch_array( $mesult )) {

$ppal = $tow['paypal'];
$isverr = $tow['isverified'];
$idyy = $tow['id'];
}

?>
<fb:dialog id="my_dialog" cancel_button=1> <fb:dialog-title>Referred Friends</fb:dialog-title> <fb:dialog-content><form id="my_form">
<?
$desult = mysql_query("SELECT * FROM main WHERE theref='$idyy'")
or die(mysql_error());

while($tdw = mysql_fetch_array( $desult )) {

$thafbee = $tdw['fbuser'];
$thaact = $tdw['activerefs'];
$thacompo = $tdw['compoffers'];

if ($thaact == "1")
{
$iliketurtles = "<font color='green'>ACTIVE</font>";
} else {
$iliketurtles = "<font color='red'>NOT YET ACTIVE</font>";
}
?>

<fb:name uid="<? echo $thafbee; ?>" /> (<a href="http://www.facebook.com/profile.php?id=<? echo $thafbee; ?>"><? echo $thafbee; ?></a>) - <? echo $iliketurtles; ?><br>
<?
}
?>
</form></fb:dialog-content></fb:dialog>
<?
$xount = mysql_num_rows(mysql_query("SELECT id FROM main WHERE theref='$idyy'"));
$xxount = mysql_num_rows(mysql_query("SELECT id FROM main WHERE theref='$idyy' AND activerefs='1'"));

echo "<br><font size='4'>Refer Friends to the Raffle!</font><br>
For every 5 friends you refer, <b>you get 1 free raffle ticket</b>!*<br><br><br>
<font size='4'>Your Referral URL:</font><br>
<a href='$appCanvasUrl$idyy'><font size='3'>$appCanvasUrl$idyy</font></a><br><br><font size='5'>You have referred <b><a href='#' clicktoshowdialog='my_dialog'>$xount</a></b> friends, <b>$xxount</b> of which are active users!</font><br><br><br>* = an Active referral is someone who adds our application from your Referral URL, and completes atleast 1 offer to earn tickets. You get 0.2 tickets per active referral (1 ticket for every 5 active referrals!)<br><hr><br><br>";
?>
<font size="4">Let us help!</font><br>
Simply click on any online friend below to send them a pre-made message with your referral URL (feel free to edit it)!<br><br>
<fb:chat-invite msg="check out the Facebook Raffle (current prize: $25, free to join) <? echo $appCanvasUrl; ?><? echo $idyy; ?>" condensed="false" /><br><br>
</div>

<div class=whiteBox>
<?php require_once 'ads/bottomads.php'; ?>

</div>

</div>



Some things you should mayby know.

$appCanvasUrl is masked as apps.facebook.com/theautolotto/

I have no idea what there is wrong. Can anybody help me?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum