it Works but doesn't Redirect to the Register Page after voted?
Forcevote
Botton of Register Page
Forcevote
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=MicroHotelPW&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=MicroHotelPW&api=http:!!HOTELURL!index?novote");
exit;
}
}
?>
Botton of Register Page
PHP:
<?php include_once ("forcevote.php");