{"id":1128,"date":"2021-05-20T22:57:41","date_gmt":"2021-05-21T05:57:41","guid":{"rendered":"http:\/\/www.top100arena.com\/content\/?page_id=1128"},"modified":"2021-06-20T15:56:54","modified_gmt":"2021-06-20T22:56:54","slug":"incentive-voting","status":"publish","type":"page","link":"https:\/\/www.top100arena.com\/content\/incentive-voting\/","title":{"rendered":"Incentive Voting"},"content":{"rendered":"\n<div class=\"ghostkit-grid ghostkit-grid-gap-md\"><div class=\"ghostkit-grid-inner\">\n<div class=\"ghostkit-col ghostkit-col-md-12 ghostkit-col-12\"><div class=\"ghostkit-col-content\">\n<p>If you have a server listed on our site, it benefits you greatly to have your members voting for it. One of the ways to convince members to take the time to vote is to offer them incentives for doing so.<\/p>\n\n\n\n<p>We provide two ways to check if a member has voted, <strong>Incentive Postback <\/strong>and <strong>IP Checking<\/strong>.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong><span class=\"has-inline-color has-white-color\">Incentive Postback<\/span><\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\">How does incentive postback work?<\/p>\n\n\n\n<p>When users come in to vote, you can append their ID (&lt; 25 characters) to the voting page using the <code>incentive<\/code> GET variable:<\/p>\n\n\n\n<p>e.g. <code>https:\/\/www.top100arena.com\/listing\/xxx\/vote?incentive=1000<\/code><\/p>\n\n\n\n<p>When adding your listing, fill out the <strong>Incentive Postback <\/strong>field with the EXACT URL you want your user ID posted to:<\/p>\n\n\n\n<p>e.g. <code>http:\/\/www.yoursite.com\/votingpage.php?postback=<\/code><\/p>\n\n\n\n<p>You can do this when <a href=\"\/manage\/listing\">editing your listing<\/a>, just log in to access it.<\/p>\n\n\n\n<p>The result will be an HTTP request sent to:<\/p>\n\n\n\n<p>e.g. <code>http:\/\/www.yoursite.com\/votingpage.php?postback=1000<\/code><\/p>\n\n\n\n<p><strong>This will happen at the exact time that the user votes. Make sure to allow for our callback IP: <strong>3.86.48.116<\/strong><\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong><span class=\"has-inline-color has-white-color\">Example PHP Code to Check Postback<\/span><\/strong><\/p>\n\n\n\n<p>This would be the contents of <code>\/votingpage.php<\/code> in the above example<\/p>\n\n\n\n<pre class=\"wp-block-code has-normal-font-size\"><code>&lt;?php\n\/\/\/\/\/\/\/\/ Example Post-Back Script for Top 100 Arena\n\n\/\/ include database connection here\n\n\/\/ this is the variable we pass back to you that\n\/\/ contains the value you passed to us with the vote link\n$user = mysqli_escape_string($_GET&#91;'postback']);\n\n\/\/ check if the user has voted\n$check_voted = mysqli_fetch_array(mysqli_query(\"SELECT vote FROM users WHERE username = '$user'\"));\nif ($check_voted&#91;0] == 0) { \/\/ if they haven't voted\n    \/\/ credit the user for voting, like giving +100 money as in the example\n    mysqli_query(\"UPDATE users SET money = money + 100, vote = '1' WHERE username = '$user'\");\n}\n?&gt;<\/code><\/pre>\n\n\n\n<p>Please <a href=\"\/content\/contact-us\/\" data-type=\"page\">contact us<\/a> if you have any questions about your account.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong><span class=\"has-inline-color has-white-color\">IP Checking<\/span><\/strong><\/p>\n\n\n\n<p>We also provide an API for you to check if a certain IP has voted.<br>Query the following page, replacing YourSiteID with the ID assigned to your website, and UsersIP with the user&#8217;s IP.<\/p>\n\n\n\n<p>e.g. <code>https:\/\/www.top100arena.com\/check_ip\/YourSiteID?ip=UsersIP<\/code><\/p>\n\n\n\n<p>The call will return a JSON object with voted equal to true or false.<\/p>\n\n\n\n<pre class=\"wp-block-code has-normal-font-size\"><code>\/\/ if IP UsersIP has voted within last 24 hours\n{\n    \"listing\": 3,\n    \"ip\": \"172.27.0.2\",\n    \"voted\": true\n}\n\n\/\/ if IP UsersIP has not voted within last 24 hours\n{\n    \"listing\": 3,\n    \"ip\": \"172.27.0.2\",\n    \"voted\": false\n}<\/code><\/pre>\n<\/div><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ghostkit_customizer_options":"","ghostkit_custom_css":"","ghostkit_custom_js_head":"","ghostkit_custom_js_foot":"","ghostkit_typography":"","_vp_format_video_url":"","_vp_image_focal_point":[]},"_links":{"self":[{"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/pages\/1128"}],"collection":[{"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/comments?post=1128"}],"version-history":[{"count":14,"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/pages\/1128\/revisions"}],"predecessor-version":[{"id":2315,"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/pages\/1128\/revisions\/2315"}],"wp:attachment":[{"href":"https:\/\/www.top100arena.com\/content\/wp-json\/wp\/v2\/media?parent=1128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}