how to add voting api onto r63 revcms

anthonyy

Member
Dec 23, 2014
127
10
ok so i followed a guide on here to set up vting api

<?php include_once ("forcevote.php"); at the top of my client.php ( BUT GIVES ME ERROR 500)

and my forcevote.php file is:

<?php
if(isset($_GET['voted'])) {
}
else {
$userip = "{$_SERVER['REMOTE_ADDR']}";
$current_url = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
$url = ' ' . $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: ");
exit;
}
}
?>

but when i click vote it takes me to playhabz.co.uk/me and i have to manually type /client

help please i am a newbie at setting up voting api so may have configure it wrong.
 

Users who are viewing this thread

Top