<?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;
}
}
?>
<?php include_once ("forcevote.php");
Did you try the updated official api?I'm getting a white screen.
Yeah, I fixed the white screen now its just taking me to /feed after voting.
How do I redirect users back to my website after they have successfully voted for my page?
Manage Pages » Edit » Voting » Return URL