TheHabbos Voting API error?
Hello, I'm using the API script from TheHabbos.org, but... When I apply it to my client, using:
PHP Code:
define('IN_CLIENT', 1);
require_once 'thehabbos_api/force.client.php';
It does load to the voting page, although when you vote, it takes you back to the page, and even when you try and click on the vote button it just keeps staying on the one page.. So I was wondering, why is it doing this and what can I do to fix this problem? cheers!
Re: TheHabbos Voting API error?
Re: TheHabbos Voting API error?
You configured it wrong, And its been 15 hours, don't bump.
Re: TheHabbos Voting API error?
Quote:
Originally Posted by
Late3
You configured it wrong, And its been 15 hours, don't bump.
Who are you to tell me not to bump it? And I didn't configure it wrong, it's not working for me -.-
Re: TheHabbos Voting API error?
bumpppz , need help please ;3
Re: TheHabbos Voting API error?
You can take a look at the plugin I use myself.
PHP Code:
<?php
$forcepages = explode(',', $plugins->settings['voting']['config']['forcevote_pages']);
//isset are faster than in_array!
if(isset($forcepages[PAGE])) {
$url = 'http://votingapi.com/validate.php?user=' . $this->plugins['voting']['config']['thehabbos_username'] . '&ip=' . $_SERVER['REMOTE_ADDR'];
$context = stream_context_create(array('http' => array('timeout' => 5)));
$data = @file_get_contents($url, 0, $context);
if(!$data || !is_numeric($data)) {
echo "<!-- [ERROR] System Failure in voting system. -->";
} elseif($data == 3) {
$url = $plugins->filter(str_replace("/", "!", $this->plugins['voting']['config']['return_page']));
header("Location: http://votingapi.com/vote.php?username=" . $this->plugins['voting']['config']['thehabbos_username'] . "&api=" . $url);
exit;
}
}
?>
Works great, theres no need for a class to check if a user has voted or not, and then force the visitor to vote!
I can offer personal help fixing/installing this if you are in need, just PM me.