FindRetro Voting

Detox

Member
Jul 24, 2010
365
24
Hello,
So I've been browsing this forum to find out how to get Voting API to work on my client!
There are so many codes to use and tested

Code/Script #1
This code work to certain degree. When I open my client page I get to the voting page BUT its doesn't redirect me to the client after voting!

PHP:
<?php
    $ip = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR'];
    $res = file_get_contents("http://votingapi.com/validate.php?user=robbo&ip=".$ip);
    if($res != 1 && $res != 2){
        header("Location: https://findretros.com/rankings/vote/Robbo");
    }
?>

Code/Script #2
This Code doesn't work for me at all!! No Voting Page just directs me to the client.

PHP:
<?php
if(isset($_GET['voted'])) {
}
else {
$userip = "{$_SERVER['REMOTE_ADDR']}";
$current_url = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
$url = 'http://votingapi.com/validate.php?user=HabCheer&ip=' . $userip;
$context = stream_context_create(array('http' => array('timeout' => 1)));
$data = @file_get_contents($url, 1, $context);
if(!$data || !is_numeric($data)) {
return "Error";
}
else if ($data == 1 || $data == 2) {
}
else {
header ("Location: http://votingapi.com/vote.php?username=HabCheer&api=https:!!habcheer.ca!index?novote");
exit;
}
}
?>

I would like to set up the vote Validator that was released but doesn't come with How To Instruction. So If someone gladly help me out that would be greatly helpful!
 

Users who are viewing this thread

Top