PHP - Tägliche Coins

01/16/2015 10:43 Marme.##1
Guten Tag.

Ich wollte mal fragen (ja hab schon gesucht), ob es ein Coins-Script gibt, wofür man nicht voten muss. Aber das soll natürlich auch nur alle 24h gehen.

:o:p
01/16/2015 10:52 DerForenLeser#2
Kannst einfach nen normales V4C Script ohne API Abfrage nehmen und es zum Beispiel zurück auf deine Homepage leiten lassen oder auf eine extra Homepage von wegen: Hier sind deine Coins, weil Du auf einen Link geklickt hast.
01/16/2015 11:30 G.I Duke#3
Also praktisch ein Auto-Coin Script dass Täglich unabhängig von Uhrzeit hauptsache am nächsten Tag Coins gutschreibt?
01/16/2015 12:36 .Shōgun#4
Make a php script that loads coins to everyone (it's a simple query) and then place it on the crontab, but this will be very easy to abuse.
01/16/2015 14:05 .Kibito#5
Quote:
Originally Posted by .Shōgun View Post
Make a php script that loads coins to everyone (it's a simple query) and then place it on the crontab, but this will be very easy to abuse.
Check in the php script if the ip adress = server ip
01/16/2015 14:19 'Mahone#6
PHP Code:
<?php

require("inc/config.inc.php");

$coins 500;

try {
    
$db = new PDO("mysql:host=".SQL_HOST.";dbname=mysql"SQL_USERSQL_PASS);
    
$db->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
    
$db->exec("update account.account set coins = coins + $coins;");
    
$db null;
    print 
"executed successfully";
} catch(
PDOException $ex) {
    print 
"Error: $ex";
    die();
}

?>
Musst dann noch einen cronjob machen