Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
FindRetro Voting
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Detox" data-source="post: 433842" data-attributes="member: 596"><p>Hello, </p><p>So I've been browsing this forum to find out how to get Voting API to work on my client!</p><p>There are so many codes to use and tested </p><p></p><p>Code/Script #1</p><p>This code work to certain degree. When I open my client page I get to the voting page <strong>BUT </strong>its doesn't redirect me to the client after voting!</p><p></p><p>[SPOILER="Code 1"][PHP]</p><p><?php</p><p> $ip = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR'];</p><p> $res = file_get_contents("http://votingapi.com/validate.php?user=robbo&ip=".$ip);</p><p> if($res != 1 && $res != 2){</p><p> header("Location: https://findretros.com/rankings/vote/Robbo");</p><p> }</p><p>?></p><p>[/PHP][/SPOILER]</p><p></p><p>Code/Script #2</p><p>This Code doesn't work for me at all!! No Voting Page just directs me to the client. </p><p></p><p>[SPOILER="Code 2"][PHP]<?php</p><p>if(isset($_GET['voted'])) {</p><p>}</p><p>else {</p><p>$userip = "{$_SERVER['REMOTE_ADDR']}";</p><p>$current_url = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);</p><p>$url = 'http://votingapi.com/validate.php?user=HabCheer&ip=' . $userip;</p><p>$context = stream_context_create(array('http' => array('timeout' => 1)));</p><p>$data = @file_get_contents($url, 1, $context);</p><p>if(!$data || !is_numeric($data)) {</p><p>return "Error";</p><p>}</p><p>else if ($data == 1 || $data == 2) {</p><p>}</p><p>else {</p><p>header ("Location: http://votingapi.com/vote.php?username=HabCheer&api=https:!!habcheer.ca!index?novote");</p><p>exit;</p><p>}</p><p>}</p><p>?>[/PHP][/SPOILER]</p><p></p><p>I would like to set up the vote Validator that was released but doesn't come with How To Instruction. So If someone gladly help me out that would be greatly helpful!</p></blockquote><p></p>
[QUOTE="Detox, post: 433842, member: 596"] Hello, So I've been browsing this forum to find out how to get Voting API to work on my client! There are so many codes to use and tested Code/Script #1 This code work to certain degree. When I open my client page I get to the voting page [B]BUT [/B]its doesn't redirect me to the client after voting! [SPOILER="Code 1"][PHP] <?php $ip = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR']; $res = file_get_contents("http://votingapi.com/validate.php?user=robbo&ip=".$ip); if($res != 1 && $res != 2){ header("Location: https://findretros.com/rankings/vote/Robbo"); } ?> [/PHP][/SPOILER] Code/Script #2 This Code doesn't work for me at all!! No Voting Page just directs me to the client. [SPOILER="Code 2"][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=HabCheer&ip=' . $userip; $context = stream_context_create(array('http' => array('timeout' => 1))); $data = @file_get_contents($url, 1, $context); if(!$data || !is_numeric($data)) { return "Error"; } else if ($data == 1 || $data == 2) { } else { header ("Location: http://votingapi.com/vote.php?username=HabCheer&api=https:!!habcheer.ca!index?novote"); exit; } } ?>[/PHP][/SPOILER] I would like to set up the vote Validator that was released but doesn't come with How To Instruction. So If someone gladly help me out that would be greatly helpful! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
FindRetro Voting
Top