Register for your free account! | Forgot your password?

You last visited: Today at 01:54

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Vote4Coins with Callback and guide

Discussion on Vote4Coins with Callback and guide within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
thewizard111's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 52
Received Thanks: 23
Vote4Coins with Callback and guide

Just google totaltop100 for the toplist. This is a new game toplist. Adding your server is free and you have 28 days free premium membership.

The Postback Function
Our goal is to make it easy and secure for your users to vote for and support your website and receive incentives such as credits. The system we have in place is quite simple and takes little programming knowledge to impliment.

The Basics
What happens is a user on your site is given a special voting link with their username or userid added to it. When this user votes we then take this username/userid and send it back to your server as a POST to your specified script to process and credit the user for voting. It is really that simple and you just need to enter URL to the script in your user , implement the example script found below, and you are ready to go.

Example Voting Url
totaltop100.com/index.php?a=in&u=TOPLIST_USERNAME&id=VOTER_USERNAME_OR_ID
You can simply switch out the url in your existing voting code from us as found in your control panel

Example Script
PHP Code:
<?php

#Example PHP Postback Script

// Your Database Connection Details
$host 'localhost';
$db_name '';
$db_user ''
$db_password '';


mysql_connect($host$db_user$db_password);
mysql_select_db($db_name);

function 
_VoteReward($userId$valid) {

    if(
$valid == 1) {

        
// Make userid safe to use in query
        
$userId mysql_real_escape_string($userId);
   
        
// Check if that user voted already
        // Adjust this query to match your table, column names etc
        
$voted mysql_fetch_array(mysql_query("SELECT voted FROM vote_list WHERE user = '$userId'"));
        if(!
$voted[0]) {
            
// User has not voted, grant him reward, for example points
            
mysql_query("UPDATE votepoints SET points = points + 1 WHERE user = '$userId'");
        }
        else {
            
// Do whatever you want if he voted already. Maybe a log of false votes
        
}

    }

}

//-------------------------- Don't change anything below this! ----------------------------- //

$ipsWhitelist = array('74.52.116.164');    

$userId = isset($_POST['userid']) ? $_POST['userid'] : null;
$valid = isset($_POST['voted']) ? $_POST['voted'] : null;

$result false;
if (!empty(
$userId) && !empty($valid)) {

    if (
in_array($_SERVER['REMOTE_ADDR'], $ipsWhitelist)) {
        
$result true;
        
_VoteReward($userId$valid);
    }

}

if (
$result) {
    echo 
'OK';
}

//Close Connection
mysql_close();

?>
The extern IP check function
If you quickly want to see if a user voted already simply visit this url
totaltop100.com/index.php?a=in&u=TOPLIST_USERNAME&ipc=THE_IP_TO_CHECK

As you can see this looks like a normal vote link, but will NOT do any vote, instead it only executes a database query and then returns either 0 or 1 (can be used with cUrl etc.) A 0 returned means the user did not vote on that day when the check was called, 1 means the user voted already.
thewizard111 is offline  
Thanks
2 Users
Old 09/09/2013, 14:19   #2
 
elite*gold: 0
Join Date: Sep 2013
Posts: 1
Received Thanks: 0
Thnx. It works. What if the user uses proxy?
hobbar is offline  
Old 09/09/2013, 14:33   #3

 
elite*gold: 1921
Join Date: Nov 2011
Posts: 472
Received Thanks: 341
Tanks for the script.


For some german members:

Finde den Release ünnötig! Da das Script NUR für die Topliste "TotalTopp100...m" ist!
Warum ist es dann ünnötig? Naja ganz einfach... Wenn ihr selbst mal auf die Topliste geht, seht ihr, dass gerade mal 5 Server unter der Kategorie eingetragen sind xD

Naja, wer's braucht. Ich kann denjenigen, die ein echt gutes Votescript wollen immer noch das von Xero und Maino empfehlen! Kostet zwar etwas, aber es funktioniert und es einfach spitze!
CHXENVS is offline  
Old 09/09/2013, 14:35   #4
 
elite*gold: 0
Join Date: Sep 2013
Posts: 506
Received Thanks: 177
Can u make it for alle Websides ?
.In¢redible´ is offline  
Old 09/09/2013, 14:42   #5
 
thewizard111's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 52
Received Thanks: 23
Most of the toplists out there on the internet they don't have POST-back functionality. So the answer is no, it cannot be done.
thewizard111 is offline  
Old 09/09/2013, 14:44   #6

 
elite*gold: 1921
Join Date: Nov 2011
Posts: 472
Received Thanks: 341
topliste.top-pserver API key?! -.-"
CHXENVS is offline  
Old 09/09/2013, 14:45   #7
 
thewizard111's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 52
Received Thanks: 23
Quote:
Originally Posted by [LxR].Enivois™ View Post
Tanks for the script.


For some german members:

Finde den Release ünnötig! Da das Script NUR für die Topliste "TotalTopp100...m" ist!
Warum ist es dann ünnötig? Naja ganz einfach... Wenn ihr selbst mal auf die Topliste geht, seht ihr, dass gerade mal 5 Server unter der Kategorie eingetragen sind xD

Naja, wer's braucht. Ich kann denjenigen, die ein echt gutes Votescript wollen immer noch das von Xero und Maino empfehlen! Kostet zwar etwas, aber es funktioniert und es einfach spitze!
The website was released 1 month ago. Every website, game server etc has a start.
thewizard111 is offline  
Old 09/09/2013, 15:02   #8
 
elite*gold: 260
Join Date: Jan 2013
Posts: 178
Received Thanks: 104
Quote:
Thnx. It works. What if the user uses proxy?
Quote:
array('74.52.116.164');
<< this IP is for the totaltop100.com site

So the problem is that whether the player has voted or not .. not about having multiple IP's which can be solved by cool down time 1-100 hours .

€ also you can check if you can add 1 more variable to the url ( cache = HASH ) and it will be stored in the db and it will change when the cool down time is over.
Metin2 Team is offline  
Old 09/09/2013, 15:25   #9
 
elite*gold: 11
Join Date: Nov 2010
Posts: 1,709
Received Thanks: 3,828
I signed my server up as I do for all toplists -a link always helps-, but this one needs way more traffic if it wants to go anywhere.

Toplist Alexa Rank: 26,271,053

WoM Alexa Rank for example is 802,226

Rank of the most popular Metin2 toplist is 84,349

The features are nice but what we want is Traffic!
.Shōgun is offline  
Old 09/10/2013, 14:31   #10
 
thewizard111's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 52
Received Thanks: 23
Quote:
Originally Posted by Metin2 Team View Post
<< this IP is for the totaltop100.com site

So the problem is that whether the player has voted or not .. not about having multiple IP's which can be solved by cool down time 1-100 hours .

€ also you can check if you can add 1 more variable to the url ( cache = HASH ) and it will be stored in the db and it will change when the cool down time is over.
User data from your website and other website's we won't store it in our database for their privacy. But you can modify the callback script for your needs. Create new database with your custom column and modify this part of the script
PHP Code:
// Check if that user voted already
        // Adjust this query to match your table, column names etc
        
$voted mysql_fetch_array(mysql_query("SELECT voted FROM vote_list WHERE user = '$userId'"));
        if(!
$voted[0]) {
            
// User has not voted, grant him reward, for example points
            
mysql_query("UPDATE votepoints SET points = points + 1 WHERE user = '$userId'");
        }
        else {
            
// Do whatever you want if he voted already. Maybe a log of false votes
        

The point is that the website uses callback function and from here you can expand the script for your needs.

I will make a tutorial with this request. Thank you.

Quote:
Originally Posted by Uncorrupted View Post
I signed my server up as I do for all toplists -a link always helps-, but this one needs way more traffic if it wants to go anywhere.

Toplist Alexa Rank: 26,271,053

WoM Alexa Rank for example is 802,226

Rank of the most popular Metin2 toplist is 84,349

The features are nice but what we want is Traffic!
That is the first query render from alexa ranking. In the first month nobody is in top 100k. It is difficult until people start adding new websites. I am advertising on some websites to keep a traffic flow for faster indexing. The main and most important is the organic traffic. I am optimizing the website for that.
thewizard111 is offline  
Old 09/11/2013, 05:59   #11
 
elite*gold: 11
Join Date: Nov 2010
Posts: 1,709
Received Thanks: 3,828
Ok, hope to see it increase. We really need a toplist that has good features and good traffic at the same time... atm you can just pick one, and you always go for traffic even if the toplist code/design/features suck. Good luck!

Personally, if I see at least, as much traffic out as I send in, or something close to that, I will add a button. Until then it's a waste of votes. Atm my site has 16 IN 8 OUT. I will wait and see.
.Shōgun is offline  
Old 09/11/2013, 08:08   #12
 
thewizard111's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 52
Received Thanks: 23
Ok. Thanks.
thewizard111 is offline  
Reply


Similar Threads Similar Threads
Vote4Coins :)
08/14/2013 - Metin2 Private Server - 1 Replies
Servus, Ich Habe Das Vote4Coins Script Von Tsuyoshi2 Mt2 Ich Brauche Dazu Eine Query kann Jemand Helfen skype:xcrankdaniel
Vote4Coins
05/08/2013 - Metin2 Private Server - 11 Replies
Sorry leute ich weiß dieses thema gab es schon 100x. Ich will mehrmls am tag voten, mache also reconnect, lösche cookies uuuuuuund: ... es klappt nicht. die topliste zeig kein grünes fenster an wo normalerweise steht, dass ich gevotet habe. Dementsprechend bekomme ich auch keine coins. Woran kann das liegen? habe mir sogar extra für diesen zweck chrome runtergeladen und auf cookies löschen eingestellt. funkt trozdem nicht. wenn ich dann an den 2. computer im haus gehe klappt es....
Vote4Coins?
10/12/2012 - Metin2 Private Server - 0 Replies
Habe den thread hier gelesen : http://www.elitepvpers.com/forum/metin2-pserver-d iscussions-questions/1436964-s-vote4coins-system.h tml Und das Kommentar von Crystal war mir eine hilfe aber... Wie füge ich nun das ein: PHP-Code: <?php
Vote4Coins
07/23/2012 - elite*gold Trading - 3 Replies
Hay, habe mal eine Frage auf manchen Metin2 P-Servern kennen ja alle sicher Vote4Coins was man aber immer nur mit einen Acc. machen darf. Hat da einer vllt ne Ahnung wie die heraus finden das man mit einer IP mehrmals gevotet hat? Ob das darauf ankommt über welche IP man den Acc. erstellt ,weil ich hab da echt KA. Oder ob man vllt einfach nur auf den Vote4Coins Button klickt und da wo man dann nach der Weiterleitung den Code eingeben muss einfach zurück geht. Man bekommt dann ja auch die...
[FRAGE] Callback Melee Damage ....
11/06/2008 - Flyff Private Server - 11 Replies
Ich würde gerne wissen was: Callback 'CWorldServer: : DoMeleeDamageMUPCallback' returned false! heißt ... ziemlich oft wen diese meldung bei meinen Servern kommt Crasht i-wie server und user können nichmea connecten hat evtl. wer nen tipp wie man das i-wie fixxen oda so könnte? Files: Lightnings Core V2



All times are GMT +2. The time now is 01:54.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.