How to add an easy API.

HrCrazy

New Member
Jun 4, 2011
19
0
Well I've seen alot of people having trouble with adding api's, so here's a basic code that does the exact same thing as an api would do. But all you need to do is add another page called /api.php or whatever and make that page come up when you click enter hotel.

Here's the code to put on that page;
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">







<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">







<head>







<title>Thehabbos - Voting Script</title>







<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />







<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>







<style type="text/css">







body {







  background-image: url('http://i209.photobucket.com/albums/bb176/TheTrueHabbo127/bg.png');







  font-family: Verdana;







  font-size: 10px;







  color: #000000;







}















#contentHolder {







  width: 450px;







  margin: auto;







  background-color: #FFFFFF;







  padding: 10px;







  border: 1px solid #CCCCCC;







  text-align: center;







}















.contentTitle {







  color: black;







  font-size: 24px; 







  font-weight: bold;







  margin-bottom: 10px;







  border-bottom: 1px solid #CCCCCC;







}







</style>







</head>















<body> 















<div id="contentHolder">







  <div class="contentTitle">Please Vote </div>







          Click the banner below to help make HOTEL NAME stay popular. You will be redirected to the <B>Client.</B>







          <br />







          <form action="http://thehabbos.org/topsites/vote/THEHABBOS ACCOUNT NAME." method="post">







            <input type="hidden" name="api_url" value="http://HOTELLINK/CLIENT" />







            <input style="width: 120px; height: 40px; background-image: url(http://thehabbos.org/topsites/button.php); border: 0px; cursor: pointer;" type="submit" name="votingAPI" value="" />







          </form>







</div>















<!-- --><script type="text/javascript" src="http://images.webs.com/static/global/js/webs/usersites/escort.js"></script><script type="text/javascript">if(typeof(urchinTracker)=='function'){_uacct="UA-230305-2";_udn="none";_uff=false;urchinTracker();}</script><!-- --><script type="text/javascript" src="http://images.webs.com/static/global/js/webs/usersites/escort.js"></script><script type="text/javascript">if(typeof(urchinTracker)=='function'){_uacct="UA-230305-2";_udn="none";_uff=false;urchinTracker();}</script></body>







</html>

You will need to edit the bit where it says ACCOUNT NAME and HOTEL NAME.
This might seem abit nooby but I hope it helped, it's MUCH easier to use if you don't know how to setup the normal API.

-------------------------- Post merged 8 Hours 37 minutes after original post. ---------------------------

Please don't leave any harsh comments please, as it is my first attempt at a thread like this.

-------------------------- Post merged 4 Hours 47 minutes after original post. ---------------------------

If you're having any troubles, PM me and I will be happy to help via tv or just to instruct you and tell you what to do. However you shouldn't have any problems.
 

HrCrazy

New Member
Jun 4, 2011
19
0
Thanks. And what do you mean "but you add for the noobs about the congif?"

-------------------------- Post merged 3 Hours 9 minutes after original post. ---------------------------

I hope this helped you guys. :)

-------------------------- Post merged 9 Hours 40 minutes after original post. ---------------------------

I will find a way to make it so once you vote, and you click enter hotel, it dont take u to the /api it takes u str8 to client, once i fixed it, i'll post it. :)
 

Users who are viewing this thread

Top