Incentive Voting

KaitoX

New Member
I have noticed some rivals out there have incentive voting where the votesite will return a message to the game owner when a player successfully votes. I realize this is not something all servers will find useful but I am wondering if we can get a plugin to handle this.
 

Basti

Administrator
Staff member
Iam not sure if it can be handled via plugin. Well part of it, yes.

1. you cannot use google friendly vote links this way, as they need to append their websites user id ( voter ) to the vote url
2. We would need a new field in the database ip_log where it stores that user id from the vote url next to the ip
3. we need a new edit form field for the postback url of the website ( where they credit a user once this url is called )
4. This relies on Php´s Curl extension, need to be enabled
5. Via the plugin code, if the vote was successfully recorded into our database, make the curl request to the postbackscript of website so that user gets credited.
If he did not voted, simply do nothing
6. You need to setup a custom page where you explain everything. Along with a sample postbackscript

This relies so heavily on the member, its not even funny.
They just enter in some url withou understanding what they do, they could totally code the postback wrong. All this could return into errors while voting for that site.
The postback scrip url could not be reachable at times ( unstable server ), maybe causing errors as well.


So, yes its possible, but you must rely on your members and hope they understand what to do
 

Morus

www.votezone.eu , www.privateserversranking.com
It is a way to do it without explanation. Simple everyone that is voting need to have account on voting site. Question is: would they register account to vote? (probably registering in forum would be better).
I have such a system that is recognising account and is placing date, time in account sql. What means people can vote every 12 hrs. If they want to do it earlier then a message pops out saying: you can vote for another bla bla minutes.
But how to implement it to visiolist? No clue.
 

Basti

Administrator
Staff member
A properbly better way would be a ip check.
You place a file on your toplist which when called with a parameter such as file.php?u=toplist_username&ipcheck=ipnumber
This file queries your database for that member and checks if the ip voted for him already.

If it returns 1, he voted already. If it return 0 he did not.
Properbly a better way and if the server owner mess something up, it will not slow down your site.
Ofcourse this depends on the owners coding as well, but all he need to code into his voting page is a curl request to our check url and set up his query to reward a member if the call is "0"
 

KaitoX

New Member
I imagine there are going to be problems with that yes. Not every member I get is going to be smart enough to handle the coding. Some of the members I had were not even smart enough to figure out 6th grade math... 6th grade math by US standards and I know more of europe has superior education to what is normal here. But when it comes right down to it I AM one of my own members and I am trying to figure out ways I can enhance the site to best suit my own needs and wants without cheating. All I would want from the plugin is for it to send back a brief message saying "[IPaddress]Voted at [Timestamp]" and beyond that point it is up to the server owner to figure out how to handle that information.
 

Mark

Administrator
Staff member
easy enough, basically the server creates a file called "VL-listener.php".

Then on successful vote VL pings that path with a GET string like ?ip=111.222.333.44&time=456123452

if that is all you need I can knock that out for you in a few minutes
 

cajkan

Active Member
well this kind of script is acctualy
Create file that stores IP wich voted succesfully. And other server admins can create a list like top voters etc. . .
Or give them in-game currencies...
Also would be cool if users are able to link theire banners and if they want to upload on website, . . But if banner is too big they can link it
 

cajkan

Active Member
Example #1


Below is an example code in PHP how to retrieve and print out the latest ip's that have voted since last time you checked. Once an ip has been fetched through report1.php it will not show up again unless the user has successfully voted again. You will be required to have some programming knowlage. Replace "YOUSITEIDNUMBER" with your gtop100 account site-id number and "YOURPASSWORD" with your gtop100 account password.
If you change the url from report1.php to report2.php the script will collect all successfully voted ip's the last 30 days.
<?php
if ($xml->errorcode == 0)
{
$cnt = count($xml->entries->entry);
for ($i = 0; $i < $cnt; $i++)
{
print($xml->entries->entry[$i]->ip);
print(" - ");
print($xml->entries->entry[$i]->time);
print("<br>");
}
}
else
{
print($xml->errormessage);
}
print("<br>");

?>
Example #2


We have provided two ways of doing it, incentive postback and IP checking.


Incentive Postback

How does incentive postback work?
When users come in to vote, you can append their ID to the voting page using the incentive GET variable:
e.g. http://www.top100arena.com/in.asp?id=xxx&incentive=1000

Fill out the Incentive URL field with the EXACT URL you want your user ID posted to.
e.g. http://www.yoursite.com/votingpage.php?postback=
You can do this when editing your site, just log in to access it

The result will be an HTTP request to
e.g. http://www.yoursite.com/votingpage.php?postback=1000

This will happen at the exact time that the user votes


Example PHP Code

This would be the contents of /votingpage.php in the above example

<?php//////// Example Post-Back Script for Top 100 Arena

// include database connection here

// this is the variable we pass back to you that
// contains the value you passed to us with the vote link$user = mysql_escape_string($_POST['postback']);
// check if the user has voted$check_voted = mysql_fetch_array(mysql_query("SELECT vote FROM users WHERE username = '$user'"));
if ($check_voted[0] == 0) { // if they haven't voted
// credit the user for voting, like giving +100 money as in the example
mysql_query("UPDATE users SET money = money + 100, vote = '1' WHERE username = '$user'");
}
?>

IP Checking

We also provide a facility for you to check if a certain IP has voted.
Just query this page:

http://www.top100arena.com/check_ip.asp?id=YourSiteID&ip=UsersIP

Replace YourSiteID with the ID assigned to your website, and UsersIP with the user's IP.

The page will return 0 if the user has not voted today, and 1 if they have.

I would wanna this kind of plugin too would be great feature
 
Top