API Issues

Status
Not open for further replies.

Joe1

Member
Mar 31, 2011
33
4
I added API recently, and for some reason even tho clicking enter client is set to send to api.php, it reads every user that voted with API once when they first voted, so every user that logins the next day skips voting and goes directly to client, How do i fix this?
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
Can you connect to TheHabbos from your host? Also, what is your user on TheHabbos?
 

Joe1

Member
Mar 31, 2011
33
4
Ye my Dedi connects to the topsite fine, and I'm Obbah, Rank 26 on Page 2
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
So you have the client opening to api.php? I tried to validate your IP and it said that you had voted today with the API, but it was not validated again after you voted.
 

Joe1

Member
Mar 31, 2011
33
4
Yes I have it opening to api.php and it goes directly to client, but If i go to api.php typing it in, works. I voted myself, but when I restarted my hotel, everyone said they weren't shown the Vote button, except for once when it worked a couple days ago
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
It should only appear once every 24 hours? And you should also have it being sent back to api.php instead of the client so it can be validated again, otherwise everyone's vote will stay as one in the database instead being set back to zero in the database.
 

Joe1

Member
Mar 31, 2011
33
4
Well it must because It's set to go from Voting to Client, How do I set it to go back to API after they vote?
 

Joe1

Member
Mar 31, 2011
33
4
Code:
<?php
//////////////////////////////////////////////////////////////
// # TheHabbos Topsites API Script - Release 1.0.0 (BETA 2) //
// # (C) Copyright TheHabbos 2010. All rights reserved.     //
//////////////////////////////////////////////////////////////

if(!defined('IN_THEHABBOS_API')) {
  die('Sorry, but you can not access this file directly. :(');
}

/* FEEL FREE TO EDIT ANYTHING BELOW */

$CONFIG['Username'] = 'Obbah'; //thehabbos topsites username
$CONFIG['URL'] = 'http://MYLINK/api.php'; //the location to the file api.php on your website (i.e. [url]http://example.com/api.php[/url])
$CONFIG['Type'] = 'client'; //current options: other or client (thehabbos_api/types)
$CONFIG['Style'] = 'Habbo Sleek'; //don't change this unless you have created your own style (thehabbos_api/styles)
$CONFIG['Credits'] = '1000'; //you can use this if you are using a specific type above - your users will be rewarded this many credits for voting

/* DO NOT EDIT ANYTHING BELOW */

$votingValidation = new Validate();
$CONFIG['Status'] = $votingValidation->validateVote();


So where would this option be?
 

Joe1

Member
Mar 31, 2011
33
4
As you see in the code above, $config['url'] , is set to mylink/api.php and it has been since the api stopped working :eek:
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
Is it literally being sent to "mylink/api.php" or "http://obbah.org/api.php"?
 

Joe1

Member
Mar 31, 2011
33
4
assumed you didn't want uneeded advertisements

 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
It seems that you have forgotten to edit the Java Script on Phoenix.

Change the following:
Code:
<a href="api.php" target="ClientWndw" onclick="window.open('client/','ClientWndw','width=980,height=597');return false;">Enter Hotel<i></i></a>

To:
Code:
<a href="api.php" target="ClientWndw" onclick="window.open('api.php','ClientWndw','width=980,height=597');return false;">Enter Hotel<i></i></a>
 

Joe1

Member
Mar 31, 2011
33
4
Code:
<a href="/api.php" target="ClientWndw" onclick="window.open('/api.php','ClientWndw','width=980,height=597');return false;">Enter Hotel<i></i></a>
is what it says


EDIT: might be cuz says /api.php but i doubt because I made it /api.php when api.php wasn't working
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
Code:
<a href="/api.php" target="ClientWndw" onclick="window.open('/api.php','ClientWndw','width=980,height=597');return false;">Enter Hotel<i></i></a>
is what it says


EDIT: might be cuz says /api.php but i doubt because I made it /api.php when api.php wasn't working
No it doesn't..
 

Joe1

Member
Mar 31, 2011
33
4
*sigh* you can close, the issue is with my site not updating, not with your API, thanks for helping me find the error
 
Status
Not open for further replies.

Users who are viewing this thread

Top