how to set up voting api onto r63b?

anthonyy

Member
Dec 23, 2014
127
10
i have registerd with findretros and have made a banner now how do i get it on my client for people to vote on my habbo retro? r63b cheers
 

Muff

Member
Aug 5, 2015
252
129
alright so just follow this and you should be good, Create a file called "forcevote.php" and add this code in this file;

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=THEHABBOSNAME&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=THEHABBOSNAME&api=http:!!HOTELURL!index?novote");
exit;
}
}
?>
Then put this on the top of your client.php file;


PHP:
<?php include_once ("forcevote.php");
 

Youngster

Sensitivity killed my dog...
Aug 10, 2015
120
15
i have registerd with findretros and have made a banner now how do i get it on my client for people to vote on my habbo retro? r63b cheers
Fastest and easiest way, Alright so I backed up the findretros voting I use. All you should have to do is go to your /app/tpl/skins/Habbo/, folder if you're using RevCMS and Drop them in there, then go to your client.php and reedit the swf links, Or you could just put this code I will list below on whatever page you wanna add voting too.
Download link:
PHP:
<?php

require_once 'findretros_config.php';
require_once 'findretros.php';

$FindRetros = new FindRetros();

if($FindRetros->hasClientVoted()) {

    echo '';

}else{

    // echo 'You have yet to vote!';

    $FindRetros->redirectClientToVote();

}


?>

P.S
If you still need help inbox me and send me your Teamviewer ID,Pass. I would be happy to do it for you.
 

Users who are viewing this thread

Top