Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 18:20

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

Advertisement



Problem mit Vote 4 Coins von .Tobias

Discussion on Problem mit Vote 4 Coins von .Tobias within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2012
Posts: 19
Received Thanks: 1
Problem mit Vote 4 Coins von .Tobias

Hallo epvp,

ich habe ein Problem mit dem Vote 4 Coins Script von .Tobias, ich verstehe
nicht wo ich die MySQL Daten eingeben soll. Schließlich muss er sich doch mit
der Datenbank verbinden. Bitte ich brauch Hilfe
Mit API Key undso komme ich klar
PHP Code:
<script language="JavaScript" type="text/javascript">
  function popup(url) {
  w = window.open(url, "", "toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=1, width=900, height=900, left = 740, top = 275");
  }
</script>
<?php
if(isset($_SESSION['user_id'])) 
{
mysql_select_db("account");
$zeit time();
$ip $_SERVER['REMOTE_ADDR'];
$date_now time();
$date_tommorrow $date_now 86400;
$getInfos mysql_fetch_assoc(mysql_query("SELECT last_ip, coins,  last_vote, vote_free FROM account.account WHERE id='".$_SESSION['user_id']."'"));
$search_ip mysql_query("SELECT last_vote FROM account.account WHERE last_ip='".$getInfos['last_ip']."'");
if((
$getInfos['vote_free'] <= $date_now) || $getInfos['last_vote'] == ""
{
if(isset(
$_POST['v4c']) && $_POST['v4c']=="Vote 4 Coins")
{
    
$ID='xxxxx';
    
$API_KEY='xxxxxxxxx';
    
$REQUEST='stats';

    
$topl_curl curl_init();
    
curl_setopt($topl_curlCURLOPT_URL,
    
'http://www.topliste.*****************/api?id=' urlencode($ID) . 
    
'&request=' urlencode($REQUEST));
    
curl_setopt($topl_curlCURLOPT_HEADER0);
    
curl_setopt($topl_curlCURLOPT_RETURNTRANSFER1);
    
curl_setopt($topl_curlCURLOPT_HTTPHEADER, array('X_APIKEY: ' $API_KEY));

    
$topl_data=curl_exec($topl_curl);
    
$topl_info=curl_getinfo($topl_curl);

    if (!
curl_errno($topl_curl))
    {
        if (
$topl_info['http_code'] == 200)
    {
    
$Data=json_decode($topl_datatrue);
    
//echo $Data["unq_in_0_weekly"]."</br>";
    
}
    else
    {
        echo 
$topl_data;
    }
    }
    else
    {
        echo 
'Curl error: ' curl_error($topl_curl);
    }
    
curl_close($topl_curl);
    
$sql "UPDATE account.vote4coins2 SET actualVotes = ".$Data["unq_in_0_weekly"]."";
    
$sqlCmd mysql_query($sql);
}








if(isset(
$_POST['v4p']) && $_POST['v4p']=="Prüfen")
{
    
$ID='683';
    
$API_KEY='60ea4e59c849f85';
    
$REQUEST='stats';
    
    
$topl_curl curl_init();
    
curl_setopt($topl_curlCURLOPT_URL,
    
'http://www.topliste.*****************/api?id=' urlencode($ID) . 
    
'&request=' urlencode($REQUEST));
    
curl_setopt($topl_curlCURLOPT_HEADER0);
    
curl_setopt($topl_curlCURLOPT_RETURNTRANSFER1);
    
curl_setopt($topl_curlCURLOPT_HTTPHEADER, array('X_APIKEY: ' $API_KEY));

    
$topl_data=curl_exec($topl_curl);
    
$topl_info=curl_getinfo($topl_curl);

    if (!
curl_errno($topl_curl))
    {
        if (
$topl_info['http_code'] == 200)
    {
    
$Data2=json_decode($topl_datatrue);
    
//echo $Data2["unq_in_0_weekly"]."</br>";
    
}
    else
    {
        echo 
$topl_data;
    }
    }
    else
    {
        echo 
'Curl error: ' curl_error($topl_curl);
    }
    
curl_close($topl_curl);
    
$sql "SELECT actualVotes FROM account.vote4coins";
    
$sqlCmd mysql_query($sql);
    
$ergebnis mysql_fetch_array($sqlCmd);
    
$dataPrüf $ergebnis['actualVotes'] + 1;
    if(
$Data2["unq_in_0_weekly"] > $dataPrüf)
    {

        
$sql2 "UPDATE account.vote4coins SET actualVotes = ".$Data2["unq_in_0_weekly"]."";
        
$sqlCmd2 mysql_query($sql2);
        
        
//VOTE 4 COINS
        
        
mysql_select_db("account");
        
$zeit time();
        
$ip $_SERVER['REMOTE_ADDR'];
        
$QueryFix mysql_query("UPDATE account.account SET last_ip='5' WHERE vote_free<='$zeit'");
        
$Update22 mysql_query("UPDATE account.account SET last_ip='$ip' WHERE id='".$_SESSION['user_id']."'");
        
        
$coins 200;
        
$date_now time();
        
$date_tommorrow $date_now 86400;
        
$getInfos mysql_fetch_assoc(mysql_query("SELECT last_ip, coins,  last_vote, vote_free FROM account.account WHERE id='".$_SESSION['user_id']."'"));
        
$search_ip mysql_query("SELECT last_vote FROM account.account WHERE last_ip='".$getInfos['last_ip']."'");
        
$new_coins $getInfos['coins'] + $coins;
        if((
$getInfos['vote_free'] <= $date_now) || $getInfos['last_vote'] == "") {
            if((
mysql_num_rows($search_ip) == 1) || ($getInfos['last_ip'] == 5) || $getInfos['last_ip'] == ""){
            
$ip $_SERVER['REMOTE_ADDR'];
            
$Update mysql_query("UPDATE account.account SET last_ip='$ip' WHERE id='".$_SESSION['user_id']."'");
            
$Update2 mysql_query("UPDATE account.account SET last_vote='$date_now' WHERE id='".$_SESSION['user_id']."'");
            
$Update3 mysql_query("UPDATE account.account SET vote_free='$date_tommorrow' WHERE id='".$_SESSION['user_id']."'");
            
$Update4 mysql_query("UPDATE account.account SET coins='$new_coins' WHERE id='".$_SESSION['user_id']."'");
            
            
            if(
$Update4) {
                echo
'<p>Du hast erfolgreich gevotet !</p>';
                
//echo '<meta http-equiv="refresh" content="1; url=http://www.topliste.*****************/in/2-utopiamt2-com.html" />';
            
}
            else {
                echo
'<p>Es ist ein Fehler aufgetreten</p>';
            }
        }
        else {
            echo
'<h2>Man darf pro Ip nur 1x Voten !</h2>';
            echo
'<p>Man darf pro IP nur 1x am Tag Voten</h2>';
        }
        }
        else {
            echo
'<h2>Es ist noch nicht Zeit!</h2>';
            echo
'<p>Du hast noch keine 24 Stunden seit deinem letzen Vote gewartet.</p>';
            
$wait $getInfos['vote_free'] - $date_now;
            
$wait $wait 3600;
            
$waits 24 $wait;
            
$timemin 60 substr($waits,0,1);
            echo
'<p>Du musst noch '.substr($wait,0,2).' Stunden warten.</p>';
            
            
        }
    }
else
{
    echo 
'<font color="red">Du hast nicht Gevotet !</font>';
    echo 
'</br>';
}    
}
?>
Anleitung:</br>
1) Klicke auf Vote 4 Coins und Vote !</br>
2) Klicke auf Prüfen und erhalte deine Coins !
<form action="index.php?s=vote4coins" method="POST">
<?PHP if(!isset($_POST['v4c'])){?>
<input type="submit" name="v4c" value="Vote 4 Coins" target="_blank" onClick="javascript:popup('http://www.topliste.*****************/in/LINK');">
<?PHP ?>
<?PHP 
if(isset($_POST['v4c']) && $_POST['v4c']=="Vote 4 Coins"){?>
<input type="submit" name="v4p" value="Prüfen">
</br>Kein Vote Fenster ? <a href="http://www.topliste.*****************/in/LINK" target="new" >Klick</a>
<?PHP 
}
}
else
{
    echo
'<h2>Man darf pro Ip nur 1x Voten !</h2>';
            echo
'<p>Man darf pro IP nur 1x am Tag Voten</h2>';

}
else
{
echo 
'Du bist nicht eingeloggt !';
}
?>
</form>
Der mir Erfolgreich geholfen hat bekommt aufjedenfall ein Thanks.
lolLipton is offline  
Old 10/20/2013, 14:48   #2
 
Hyukisawa's Avatar
 
elite*gold: 133
Join Date: May 2007
Posts: 506
Received Thanks: 194
in der regel hat man ja schon ein homepage script was oft ne url mit index.php?site=vote4coins (bsp) aufgerufen wird

das wird ja über die index datei aufgerufen oft wird in die index.php schon eine config.php included mit den db daten

heißt er findet die sql verbindung durch die config.php in der index und sagt dann das er sich mit db account verbinden will...
wenn du das script einbindes was für ein fehler kommt den ?

wenn du hilfe haben willst kannst mich skypen adden.

wenn du mich addest bitte mit epvp name und thread link
Hyukisawa is offline  
Thanks
1 User
Old 10/20/2013, 14:58   #3


 
elite*gold: 0
Join Date: Feb 2010
Posts: 7,220
Received Thanks: 6,758
Du könntest auch Tobias direkt anschreiben beziehungsweise in seinem Thema dazu nachfragen.
#SoNiice is offline  
Thanks
1 User
Old 10/20/2013, 14:59   #4
 
elite*gold: 280
Join Date: May 2009
Posts: 1,208
Received Thanks: 136
Frag einfach bei Tobias selber mal nach der kann dir am besten dabei helfen
Mr|NFNx is offline  
Thanks
2 Users
Old 10/20/2013, 21:39   #5
 
elite*gold: 0
Join Date: Sep 2012
Posts: 19
Received Thanks: 1
Danke!
Endlich gibt mir jemand mal ne ordentliche Antwort Ihr seid super!
Aber ich habs schon alleine hinbekommen und versteh die Handlung über das Script wie es jetzt funktioniert.
Bekommt alle mal ein Thanks von mir

MFG

lolLipton / BR34K3R
lolLipton is offline  
Old 10/21/2013, 03:41   #6
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,916
Received Thanks: 538
benutz das vote4coins script von maino.
'oShet is offline  
Reply


Similar Threads Similar Threads
[Problem]Vote 4 Coins
06/05/2013 - Metin2 Private Server - 9 Replies
Hey Epvp habe ein problem mit dem Vote 4 Coins Script Ich gehe auf mein ......cwsurf.de/vote.php nun seite 1 Account id eingeben und wenn ich auf Vote klicke Passiert das : Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/www/cwcity/hosting/i/n/testm2/htdocs/vote.ph p on line 47 Invalid query: No database selected Whole query: Bitte um schnelle antwort. # PUSH !
vote 4 coins problem
04/13/2012 - Metin2 Private Server - 2 Replies
also ich hab das vote 4 coins system einbauen wollen. ich habe es shcon mal soweit geschaft des der vote button erscheint, aber beim klicken des button kommen dann zwei fehler ich weiß schon mal das diese meinen das in den zeilen 98 und 106 fehler sind, aber ich kenne mich mit dem vote 4 coins script nich aus also könnt ihr mir helfen? hier die 2 zeilen: 98:
[B] Vote 4 Coins Script (IP & Account Abfrage) bis zu 5 Vote Seiten! (Eigenständig)
10/11/2011 - Metin2 Trading - 2 Replies
Ich habe ein Vote System programmiert, bei dem Spieler für Coins voten können. Bis zu 5 Seiten können eingetragen werden (Kann ich beliebig erweitern) Es wird in einer Datenbank die IP & AccountID gespeichert, somit kann man mit einer IP auch nur einmal Voten und pro Account auch nur einmal auch wenn man die IP resetten sollte. Somit ist ein Betrug vollkommen ausgeschlossen. Das Script ist eigenständig und passt somit zu jeder Website!



All times are GMT +1. The time now is 18:22.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.