getAccessToken(); /* Save the access tokens. Normally these would be saved in a database for future use. */ $_SESSION['oauth_access_token'] = $tok['oauth_token']; $_SESSION['oauth_access_token_secret'] = $tok['oauth_token_secret']; } /* Create TwitterOAuth with app key/secret and user access key/secret */ $to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION['oauth_access_token'], $_SESSION['oauth_access_token_secret']); //- Get the account details $theobject = $to->get('account/verify_credentials'); //- Extract ID //$theobject->{'first name'}->inputtype; //- braces if spaces $twitter_id = $theobject->id; $twitter_name = explode(" ", $theobject->name); $twitter_first = $twitter_name[0]; $twitter_last = $twitter_name[1]; //- trigger this later on to reduce api hits $status = $to->post('statuses/update', array('status' => 'Test your knowledge of the classic RUSH album - enter Moving Pictures Contest '.ROOT_URL.'')); //$content = $to->get('account/rate_limit_status'); //echo "Current API hits remaining: {$content->remaining_hits}."; break; default: /* Create TwitterOAuth object with app key/secret */ $to = new TwitterOAuth($consumer_key, $consumer_secret); /* Request tokens from twitter */ $tok = $to->getRequestToken(); /* Save tokens for later */ $_SESSION['oauth_request_token'] = $token = $tok['oauth_token']; $_SESSION['oauth_request_token_secret'] = $tok['oauth_token_secret']; $_SESSION['oauth_state'] = "start"; $request_link = $to->getAuthorizeURL($token); $content_status = "default"; break; } /* echo '
'; echo '

DAN\'S DEBUGGER:

'; echo '
';
	print_r($_COOKIE);
	echo '
'; echo '
';
	print_r($_SESSION);
	echo '
'; echo '
';
	print_r($_REQUEST);
	echo '
'; echo '
';
	print_r($theobject);
	echo '
';*/ ?>
SAVE THEM & SEND ********************************************************************************/ if(isset($_POST['ids'])){ $referred = count($_POST['ids']); $idents=$_POST['ids']; $comma_seperated = implode(",", $idents); $result1 = mysql_query("SELECT people FROM site_members WHERE fbid='".$cookie['uid']."'"); $num_rows = mysql_num_rows($result1); //echo $num_rows.'

'.$referred.'

'; if($num_rows>0) { while($row1 = mysql_fetch_array($result1)){ $referredids=$row1['people']; $targetpeople=$comma_seperated.','.$referredids; $targetpeople=(explode(",",$targetpeople)); $peoplearray=array_unique($targetpeople); $targetreferred = count($peoplearray) - 1; $targetpeople = implode(",", $peoplearray); $query1 = "UPDATE site_members SET people='$targetpeople', referred='$targetreferred' WHERE fbid='".$cookie['uid']."' LIMIT 1"; $resulta = mysql_query($query1); } if($referred >=3){ $gameMode = "bonus"; } else{ $gameMode = "bonus-failed"; } } } //- Have they already played? if($login_type == 'facebook'){ if($gameMode == "bonus"){ $maxPlays = 2; } else{ $maxPlays = 1; } } else{ $maxPlays = 1; } if($gameCount >= $maxPlays){ ?>
Flash Player upgrade required.

CLICK HERE TO DOWNLOAD
Flash Player upgrade required.

CLICK HERE TO DOWNLOAD
Sign in with Facebook Sign in with Twitter Login to play

*/?>

Please complete the missing fields to complete your registration to enter the competition. Required fields are denoted by a *

value="" value="" value="" />

value="" value="" value="" />

value="" value="" />

(Please note if you enter your mobile number you are agreeing to receive SMS updates. These messages will be FREE of charge, they will not cost you anything.)

*/?>

By clicking Submit you are agreeing to The Rush Competition Terms & Conditions