• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Paypal script [SQLITE]

Milice

Nutjob
Joined
Oct 4, 2008
Messages
954
Solutions
2
Reaction score
157
Location
Sverige ;D
Hi, i just made my server on linux and on linux does crying damson not support MySQL so i made a Sqlite script for Paypal donations, i will just release the ipn file since thats all thats needed, if you dont have the other files you can find them here: Paypal Script [RELEASE] By Artii


Here is the ipn.php file for SQLite:
Code:
<?

// WHOLE SCRIPT REMADE FOR SQLITE BY MILICE



$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));

$receiver_email = $_REQUEST['receiver_email'];

$payment_status = $_REQUEST['payment_status'];

$mc_gross = $_REQUEST['mc_gross'];

$currency = $_REQUEST['mc_currency'];

// DB CONNECT

$dbplace = '/home/milice/Desktop/necronia/forgottenserver.s3db';

$db = new PDO('sqlite:'.$dbplace.'');

// END OF DB CONNECT

if ($payment_status == "Completed" & $receiver_email == "[email protected]" & $mc_gross == "5.0") {



$query = $db->query('SELECT * FROM accounts WHERE name = '.$custom.'')->fetch();



$currentpoints = $query['premium_points'];
$pointstogive = 5;


// $points = mysql_query($prem)

$query2 = $db->query('UPDATE accounts SET premium_points = '.$currentpoints.'+'.$pointstogive.' WHERE name = '.$custom.'');



}

else

 { 

 echo("Error.");

 }

?>

This script is only tested on Linux.

Code:
$pointstogive = 5;
Change the 5 to the points you want your player to recieve after donation.
if ($payment_status == "Completed" & $receiver_email == "[email protected]" & $mc_gross == "5.0")
change your email and change mc_gross to the amount your players donate.

$dbplace = '/home/milice/Desktop/necronia/forgottenserver.s3db';
change to where the sqlite database is located!
 
Thread Approved
 
Rofl, it says in my post, im using linux and it doesn't support mysql ;)
Oki.

outy5j.png
 
u_u its not MySQL itself that doesnt work, the server doesn't support mysql ffs..

Minumum Requirement for getting this:
1 Brain

OK.... you're the one who needs a brain.

First: TFS Support mysql on LINUX AND WINDOWS.
Second: Debian -- Details of package mysql-server-5.0 in lenny
Code:
Package: mysql-server-5.0 (5.0.51a-24+lenny3)

MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of MySQL are speed, robustness and ease of use.

What Linux distro you are using?
 
u_u its not MySQL itself that doesnt work, the server doesn't support mysql ffs..

Minumum Requirement for getting this:
1 Brain

JAJAJAJJJAJJJJJAJJAJAJAAJAJAJJAJAJAJJA

You made my day, you are very intelligent Milice, god gave you a gift, use it wisely.

Linux DO have mysql.

Code:
nicloox@ttrxv10:~$ mysql -V
mysql  Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (x86_64) using  EditLine wrapper
 
omg <.< TFS Crying damson 0.3.6pl1 doesn't compile with MySQL on Ubuntu 9.10 thats the thing and this is not a mysql discusting thread, its sqlite paypal script lol xD
 
omg <.< TFS Crying damson 0.3.6pl1 doesn't compile with MySQL on Ubuntu 9.10 thats the thing and this is not a mysql discusting thread, its sqlite paypal script lol xD

Code:
./configure --enable-mysql
while compiling tfs, gogogo! if you have any compiling error post'em here and i'll help ya fixing them.
 
Code:
./configure --enable-mysql
while compiling tfs, gogogo! if you have any compiling error post'em here and i'll help ya fixing them.

omg i tried that and i looked at the mysql errors and there are nothing to do about them
 
Post the errors then, i have Ubuntu on my laptop and i am able to run 0.4 and 0.3 without a single problem.

Nah its cool, remade so much stuff for sqlite anyways xD but thanks for offering your help :peace:
 
Is it just me that is a bit worried about SQL Injection in that piece of code ? :$
 
Back
Top