Findretros voting error?

lilramsy

New Member
Feb 12, 2018
24
0
I haven't seen this posted anywhere, but I seem to get these issues whenever I try to go to my findretros.php:


The code I use is:
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=blink&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=blink&api=http:!!blinkhotel.co.uk!index?novote");
exit;
}
}
?>

whenever I use my username "blink" (not login) I get a white page, but if I were to use any other username, like spark, or even blinkhotel, it works. I even made a new server for testing and did the same there. Didn't work. Am I missing something?
 

treebeard

Member
Jan 16, 2018
317
173
I haven't seen this posted anywhere, but I seem to get these issues whenever I try to go to my findretros.php:


The code I use is:
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=blink&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=blink&api=http:!!blinkhotel.co.uk!index?novote");
exit;
}
}
?>

whenever I use my username "blink" (not login) I get a white page, but if I were to use any other username, like spark, or even blinkhotel, it works. I even made a new server for testing and did the same there. Didn't work. Am I missing something?
I've not had this issue so I don't have a for sure answer for you but one thing I noticed in difference between your code and mine is
you have this:
Code:
header ("Location: http://votingapi.com/vote.php?username=blink&api=http:!!blinkhotel.co.uk!index?novote");

This is what mine looks like there:
Code:
header ("Location: http://votingapi.com/vote.php?username=FINDRETRONAME&api=http://YOURHOTEL/?novote");
 

lilramsy

New Member
Feb 12, 2018
24
0
I've not had this issue so I don't have a for sure answer for you but one thing I noticed in difference between your code and mine is
you have this:
Code:
header ("Location: http://votingapi.com/vote.php?username=blink&api=http:!!blinkhotel.co.uk!index?novote");

This is what mine looks like there:
Code:
header ("Location: http://votingapi.com/vote.php?username=FINDRETRONAME&api=http://YOURHOTEL/?novote");
Changed it and it does the same thing, white screen. I'm not sure if this is a fault on my side or on findretros, since I even created a second server and it gave me the same error.
 

treebeard

Member
Jan 16, 2018
317
173
Changed it and it does the same thing, white screen. I'm not sure if this is a fault on my side or on findretros, since I even created a second server and it gave me the same error.
Most likely an error on your end as the API works fine on any other hotel I've visited today.
If you haven't read this thread, I would highly suggest doing so.
 

lilramsy

New Member
Feb 12, 2018
24
0
Most likely an error on your end as the API works fine on any other hotel I've visited today.
If you haven't read this thread, I would highly suggest doing so.
Already read that thread before I made this one, still no luck. I'm using BrainCMS, does that make a difference?
 
Note that whenever I used someone else's username it would work, so instead of having it be "blink" (which didnt work) using blinkhotel (which is someone else's server) works.
 
UPDATE: For some weird reason, it seems to work now. I haven't made any new changes. It could be possible that the website server needed to update.
 

Users who are viewing this thread

Top