Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

TheHabbos Voting API error?

Gamma Spamma
[VIP] Member
Joined
Dec 16, 2011
Messages
1,989
Reaction score
626
Hello, I'm using the API script from TheHabbos.org, but... When I apply it to my client, using:
PHP:
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!
 
Sean told me to come back
Joined
Jul 21, 2007
Messages
39
Reaction score
9
You configured it wrong, And its been 15 hours, don't bump.
 
Upvote 0
☮TAKU????
Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
You can take a look at the plugin I use myself.

PHP:
<?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.
 
Upvote 0
Back
Top