1. Tired of not being able to see links? Want to chat with other members? Need help?

How to: Adding FindRetros voting to your hotel

Discussion in 'Habbo Tutorials' started by iGlenn, Oct 26, 2016.

  1. iGlenn

    iGlenn :)

    Joined:
    Jul 21, 2015
    Messages:
    618
    Likes Received:
    116
    I realize there are a ton of tutorials on this but for some reason people still seem to struggle and make threads about it so today I will show you how to guarentee get the voting system setup on your hotel.

    What you will need:
    - FindRetros account to setup an ad page
    - Banner
    - Common sense

    1. Register on FindRetros and create an ad for your hotel (If you already have then skip to step 2.)

    2. Make a file in your skin folder called forcevote.php and add this code
    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=habbo&ip=' $userip;
    $context stream_context_create(array('http' => array('timeout' => 1)));
    $data = @file_get_contents($url1$context);
    if(!
    $data || !is_numeric($data)) {
    return 
    "Error";
    }
    else if (
    $data == || $data == 2) {
    }
    else {
    header ("Location: http://votingapi.com/vote.php?username=habbo&api=http:!!habbo.com!index?novote");
    exit;
    }
    }
    ?>
    We're not done so don't save the file yet! Now where it says...
    PHP:
    $url 'http://votingapi.com/validate.php?user=habbo&ip=' $userip;
    Replace the word habbo with your FindRetros voting page username (NOT YOUR LOGIN USER)
    Also where it says...
    PHP:
    header ("Location: http://votingapi.com/vote.php?username=habbo&api=http:!!habbo.com!index?novote");
    Replace habbo with your FindRetros voting page username and lastly where it says habbo.com change just that to your hotel url (Don't mess with the code or your voting wont work!)

    3. Now whatever page you want users to be prompt to vote add this at the very top of that file (Usually above <!DOCTYPE html>)
    PHP:
    <?php include_once ("forcevote.php");
    ?>
    Client.php, Index.php, or Me.php is usually where most hotels decide to put theirs but its up to you where you want yours! I don't recommend on the index as apparently findretros is against it but i see a whole bunch of hotels who still do it so do at your own risk.

    4.
    Refresh and if you did it right you now have voting :)

    NOTE: Some people may get a voting loop or some other silly problem and if so then i'm sorry. By the time you see this I probably quit devbest so will not be providing support!
     
    Last edited: Oct 31, 2016
    Poizone and AusNGrant like this.
  2. AusNGrant

    AusNGrant Member

    Joined:
    Jun 21, 2015
    Messages:
    74
    Likes Received:
    10
    Decent tutorial for the new ones out there, much easier than other tutorials where you go into cloudflare and create page rules etc etc.
     
    iGlenn likes this.
  3. iGlenn

    iGlenn :)

    Joined:
    Jul 21, 2015
    Messages:
    618
    Likes Received:
    116
    thanks :)
     
  4. tOaStMaYn

    tOaStMaYn wut wut

    Joined:
    Jun 10, 2012
    Messages:
    1,417
    Likes Received:
    643
    I've used this a few times but noticed some people run into a redirect loop, not sure what triggered it though!
     
    Brought and iGlenn like this.
  5. JynX

    JynX if (!IsCool()) { BecomeCool("JynX"); }

    Joined:
    Feb 6, 2016
    Messages:
    609
    Likes Received:
    372
    Has to do with certain ISP's blocking the way it works.
     
  6. tOaStMaYn

    tOaStMaYn wut wut

    Joined:
    Jun 10, 2012
    Messages:
    1,417
    Likes Received:
    643
    I thought that, I noticed BT blocked this.
     
    JynX likes this.
  7. Poizone

    Poizone Member

    Joined:
    Sep 7, 2011
    Messages:
    66
    Likes Received:
    20
    Not bad.
     
    iGlenn likes this.
  8. iGlenn

    iGlenn :)

    Joined:
    Jul 21, 2015
    Messages:
    618
    Likes Received:
    116
    I realize this may not work for everyone and if so then I'm sorry. It worked for me so I thought id share. If it doesn't work for you then just remove it :p
     
    Poizone likes this.
  9. Sly

    Sly Ex Owner of Robbo Hotel

    Joined:
    Oct 28, 2016
    Messages:
    218
    Likes Received:
    31
    This is old and it doesnt work, well it works but some users may not be able to connect. Use the API thats given on Findretros.
     
  10. Meap

    Meap Don't need glasses if you C#

    Joined:
    Nov 7, 2010
    Messages:
    951
    Likes Received:
    280
    or just use this
    Code:
    <?php
    $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
    $url = 'http://votingapi.com/validate.php?user=George&ip=' . $ip;
    $hasvoted = @file_get_contents($url);
    if($hasvoted != '1' && $hasvoted != '2'){
     header ("Location: https://findretros.com/vote/George");
     exit;
    }
    ?>
     

Share This Page

Loading...