Adding a Force Vote API to the me page/index > Me

ano2k77

Member
Feb 4, 2013
466
30
So basically, I want the force vote thing so like, before they get on the Me page "/me" they have to vote, for instance when they log in or register or just go on the URL after 24 hours or whenever they have to vote.

I tried adding it to the client the other night so they had to force vote before they entered the client, and it worked fine for people who hadn't yet voted on that day, but if you had already voted and tried entering the client, it would keep coming up a page like "This link has a re-direct loop" and stuff like that and you could never get on the client, could someone please give me a code for the FindRetros API for the /me page so they have to vote before they get on /me?

And could you tell me how to install it, like... Where to put the force vote link etc, cheers!
 
BUMP! Please! Need help with this
 

13rad

King
Sep 15, 2013
156
36
Put this on top of ur me page then go to your findretros account and change return url to

Code:
<?php if (!isset($_GET['novote'])) {
 if ($_GET['url'] != 'register') { 
  $context = stream_context_create(array('https' => array('timeout' => 0.1)));
  $data = file_get_contents('https://findretros.com/validate.php?user=YOURFINDRETROS USERNAME&ip=' . $_SERVER['REMOTE_ADDR'], 0, $context);
  if($data == 3) {
   header("Location: https://findretros.com/vote/YOURFINDRETROSUSERNAME");
   exit;
  }
 }
}?>
 

ano2k77

Member
Feb 4, 2013
466
30
I just tried that but now, after I've voted, it comes up this:

SeoPX6K.png
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
I was never able to figure this out there. The tutorial always creates a loop for me, and a lot of hotels I can't access because of the loops.. So if anyone figures it out how to avoid loops I would like to know too
 

13rad

King
Sep 15, 2013
156
36
<?php
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; }
if (!isset($_GET['novote']) && $_GET['url'] != 'register') {
$context = stream_context_create(array('https' => array('timeout' => 0.5)));
$data = file_get_contents(' ' . $_SERVER['REMOTE_ADDR'], 0, $context);
if($data == 3) {
header("Location: ");
exit;
}
}
?>
Put this at ur header and try it.
 

Users who are viewing this thread

Top