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
Miscellaneous
FindRetros
Help & Support
FindRetros Help
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="Fume" data-source="post: 315009" data-attributes="member: 54516"><p>Save this as forcevote.php and save it in your CMS:</p><p>[SPOILER][CODE]<?php</p><p></p><p>if(isset($_GET['voted'])) {</p><p></p><p>}</p><p>else {</p><p></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=HOTELNAME&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=HOTELNAME&api=http:!!HOTELURL!index?novote");</p><p>exit;</p><p>}</p><p></p><p>}</p><p></p><p>?>[/CODE][/SPOILER]</p><p>Make sure you replace HOTELNAME with your findretros page id.</p><p>go to your me page, or where you want it and add </p><p>[CODE]<?php include_once ("forcevote.php");[/CODE]</p><p>at the bottom,</p><p>then go to findretros and edit your page, click 'voting' and change the url to yourlink/me</p><p>I hope I helped!</p></blockquote><p></p>
[QUOTE="Fume, post: 315009, member: 54516"] Save this as forcevote.php and save it in your CMS: [SPOILER][CODE]<?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=HOTELNAME&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=HOTELNAME&api=http:!!HOTELURL!index?novote"); exit; } } ?>[/CODE][/SPOILER] Make sure you replace HOTELNAME with your findretros page id. go to your me page, or where you want it and add [CODE]<?php include_once ("forcevote.php");[/CODE] at the bottom, then go to findretros and edit your page, click 'voting' and change the url to yourlink/me I hope I helped! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Miscellaneous
FindRetros
Help & Support
FindRetros Help
Top