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
Infinite reloading
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="Eronisch" data-source="post: 170254" data-attributes="member: 2046"><p>Hi,</p><p> </p><p>I'm using cloudflare and a script someone here made, with a votecheck function for revcms.</p><p>But if i vote it redirects me to the page i wanted to go to, but that page keeps reloading.</p><p> </p><p>However when i close the page, and reopen it and than go to the website again it works fine.</p><p>Because i have already voted, it seems like a mod-rewrite issue.</p><p> </p><p>Does someone knows a fix for it?</p><p> </p><p>This is the code i am using:</p><p> </p><p>[PHP] final public function CheckIfVoted($ip) {</p><p> global $_CONFIG;</p><p> $vote_username = "diaxahotel26";</p><p> $current_url = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);</p><p> $hotelurl = $_CONFIG['hotel']['url'];</p><p> $url = 'http://votingapi.com/validate.php?user=' . $vote_username . '&ip=' . $ip;</p><p> $context = stream_context_create(array('http' => array('timeout' => 5)));</p><p> $data = @file_get_contents($url, 0, $context);</p><p> </p><p> if(!$data || !is_numeric($data)) {</p><p> return "[ERROR] System Failure in voting system.";</p><p> } else if ($data == 1 || $data == 2) {</p><p> return "";</p><p> } else {</p><p> return '<form action="http://votingapi.com/vote/' . $vote_username . '" method="post" name="votingform"></p><p> <input type="hidden" name="api_url" value="' . $hotelurl . '/' . $current_url . '" /></p><p> </form></p><p> <script language="javascript">setTimeout("document.forms[\'votingform\'].submit()",0); </script>';</p><p> exit;</p><p> }</p><p> }[/PHP]</p><p> </p><p>Mod-Rewrite .htacces file:</p><p> </p><p>[php]</p><p>RewriteEngine On</p><p> </p><p>RewriteRule ^(|/)$ index.php?url=$1</p><p>RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1</p><p>RewriteRule ^(.*)\.htm$ $1.php [NC]</p><p>RewriteRule ^(|/)$ dash.php?page=$1</p><p>RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ dash.php?url=$1</p><p>[/php]</p><p>It does redirect me to the page i wanted to, but when i am on it. it keeps reloading.</p></blockquote><p></p>
[QUOTE="Eronisch, post: 170254, member: 2046"] Hi, I'm using cloudflare and a script someone here made, with a votecheck function for revcms. But if i vote it redirects me to the page i wanted to go to, but that page keeps reloading. However when i close the page, and reopen it and than go to the website again it works fine. Because i have already voted, it seems like a mod-rewrite issue. Does someone knows a fix for it? This is the code i am using: [PHP] final public function CheckIfVoted($ip) { global $_CONFIG; $vote_username = "diaxahotel26"; $current_url = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); $hotelurl = $_CONFIG['hotel']['url']; $url = 'http://votingapi.com/validate.php?user=' . $vote_username . '&ip=' . $ip; $context = stream_context_create(array('http' => array('timeout' => 5))); $data = @file_get_contents($url, 0, $context); if(!$data || !is_numeric($data)) { return "[ERROR] System Failure in voting system."; } else if ($data == 1 || $data == 2) { return ""; } else { return '<form action="http://votingapi.com/vote/' . $vote_username . '" method="post" name="votingform"> <input type="hidden" name="api_url" value="' . $hotelurl . '/' . $current_url . '" /> </form> <script language="javascript">setTimeout("document.forms[\'votingform\'].submit()",0); </script>'; exit; } }[/PHP] Mod-Rewrite .htacces file: [php] RewriteEngine On RewriteRule ^(|/)$ index.php?url=$1 RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1 RewriteRule ^(.*)\.htm$ $1.php [NC] RewriteRule ^(|/)$ dash.php?page=$1 RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ dash.php?url=$1 [/php] It does redirect me to the page i wanted to, but when i am on it. it keeps reloading. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Miscellaneous
FindRetros
Help & Support
Infinite reloading
Top