Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 30th June 2008, 23:30
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 984
Default Pay by SMS
I also would like us to develop this mod because i use it on a tracker and it is really great !
I found smth on tbdev.net so i brought it here, i don`t know if it`s working but it can be starting point !

This mod allows your users to donate by sending a SMS from their cellphone.

This script is configured to work with the swedish site: http://www.mosms.com

For those that don`t understand Swedish they need another provider of this service, here are some:

http://www.daopay.com
http://www.smskambi.com/en
http://www.123ticket.com

If you have another SMS site that you want this script to work with just easily change the $_REQUEST variables in takesms.php.
If you want help with that i can probably help you out there.


Run this query in your Database:

Code:
ALTER TABLE `users` ADD `cell` varchar(255) NOT NULL default '';
Make the next php files:

sms1.php
Code:
<?
ob_start("ob_gzhandler");
require_once("include/bittorrent.php");
dbconn(true);
loggedinorreturn();
stdhead();
begin_main_frame();
begin_frame("SMS Donation");

  $curre = $CURUSER['username'];
  $cell = $_POST['cell'];

echo("<h2>SMS donation (25 SEK) Step 1/3</h2>");

?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="POST">
What cellphone number will you donate from?

OBS! Type your cellphone number below. See the example.


<input type="text" name="cell">

example: 0701234567



<input type="submit" name="submit" value="Continue">
</form>

<?

if($_POST['submit'] && $_POST['cell']){
  mysql_query("UPDATE users SET cell = '".mysql_real_scape_string($cell)."' WHERE username = '$curre'");
  header("Location: sms2.php");
  }

end_frame();
end_main_frame();
stdfoot();
?>
sms2.php
Code:
<?
ob_start("ob_gzhandler");
require_once("include/bittorrent.php");

dbconn(false);
loggedinorreturn();
stdhead();
begin_main_frame();
begin_frame("SMS Donation");

echo("<h2>SMS donation (25 SEK) Step 2/3</h2>
");
echo("Send a SMS to 72550 with the following information: ");
echo("");
echo("SILVTORR"); // YOUR PREFIX HERE
echo("

");
?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="GET">
<input type="submit" name="submit" value="Continue">
</form>

<?

if($_GET['submit']){
header("Location: sms3.php");
}
end_frame();
end_main_frame();
stdfoot();
?>
sms3.php
Code:
<?
require_once("include/bittorrent.php");

dbconn(false);
loggedinorreturn();
stdhead();
begin_main_frame();
begin_frame("SMS Donation");

echo("<h2>SMS donation (25 SEK) Step 3/3</h2>");


echo("Your donation should now be complete!
 You will notice this with a star beside your nickname!

 The staff at silvertorrents.org are graceful for your donation and are hoping that you will like us.");


end_frame();
end_main_frame();
stdfoot();
?>
takesms.php
Code:
<?php
require_once("include/bittorrent.php");
dbconn(true);

if ((empty($_REQUEST['nr'])) || (!isset($_REQUEST['nr'])))
die('No NR is there');

$nr = $_REQUEST['nr']; // Cellphone number donation came from
$donated = $_REQUEST['tariff']; // How much that have been donated
$curre = $CURUSER['username'];
$qry = "UPDATE users SET donated = '$donated' WHERE cell = ".sqlesc($nr)." LIMIT 1"; // Remove this line if you dont have the donation mod or the donated column in your sql 
$qry2 = "UPDATE users set donor = 'yes' WHERE cell = '$nr'";
mysql_query($qry); // Remove this line if you dont have the donation mod or the donated column in your sql
mysql_query($qry2);

echo("Thank you for your donation! You are helping us to continue to run our activity //Staff"); //This is the SMS to the cellphone
?>
Just simply link your connection @Your_Provider to takesms.php .

Also be sure to have no errors in takesms.php or add this line -> error_reporting(0);

If you have errors in your takesms.php code it will be sent to the cellphone.

Why?
Well because everything you are echoing in the takesms.php file will be sent to the cellphone.
So if you have any errors in your takesms.php the error msg will be sent to the cellphone.

Thats it i'll hope you will like this mod and if you have any questions just ask.

@http://www.tbdev.net/index.php?showtopic=7028
Reply With Quote
The Following 2 Users Say Thank You to Fynnon For This Useful Post:
d6bmg (14th November 2010), FENIX (28th January 2013)
  #2  
Old 1st July 2008, 20:25
vertex vertex is offline
Senior Member
 
Join Date: Mar 2008
Posts: 46
Default Re: [TBDEV]Pay by SMS
Tnx
Reply With Quote
  #3  
Old 1st October 2010, 11:46
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
i don't get it how to use this :D
Reply With Quote
  #4  
Old 14th November 2010, 08:46
d6bmg d6bmg is offline
Senior Member
 
Join Date: Aug 2010
P2P
Posts: 36
Default
nice invention.. thanks!!!
Reply With Quote
Reply

Tags
pay , sms

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[TBDev] shoutcast radio for tbdev Slatkis TBDev 14 3rd June 2017 09:08
TorrentStrike theme engine to TBdev Kotafi Mods & Themes 6 13th May 2012 04:42
[TBDEV] Pets Scripts for TBDev BacKUP TBDev 4 7th September 2011 15:36



All times are GMT +2. The time now is 15:28. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.