Purpose: Adding Daopay PIN check tool to your website
Difficulty: 3
Assumed Knowledge: SQL info, Some PHP, HTML, common sense.
Server Base: Any server that you have integrated with your IBF
Classes Modified: validate.php form.html
EDIT ** Admins can soon use their password as pin to give someone free premium membership! And i integrated anti double pin usage, and password requirement.
Step 1:
First of all, register at [Only registered and activated users can see links. ] and Enter your website, and create the product you want to sell on your website. (in this case premium)
Then the database part for the pins:
Create a table named "Pins" in your servers database.
Inside the table there will be a few fields:
- ID (int 4 auto increment not null)
- PIN (varchar 20 not null)
- DATE (date not null)
Heres the SQL query:
Code:
/*
MySQL Data Transfer
Source Host: localhost
Source Database: runescape
Target Host: localhost
Target Database: runescape
Date: 6/6/2008 11:22:38 AM
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for pins
-- ----------------------------
CREATE TABLE `pins` (
`ID` int(4) NOT NULL,
`PIN` varchar(20) NOT NULL,
`DATE` date NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records
-- ----------------------------
Step 2
When you have created your account and executed the query, it's time to create the PHP file.
Create a PHP file called validate.php and put this code in it:
- appcode= (replace 44919 with your appcode, wich you can find on daopay.com when logged in.)
-subkey= (your product id, the name of your product, also look on daopay.com)
-SQL HOST (Fill out your host IP here, if running on your own PC its: "localhost")
-SQL USER (SQL server root user, or other user with full access)
-SQL PASS (Password you have set for the user aforementioned.)
-SQL DATABASE (The database of your IBF)
After you edited all these parameters, save and close.
Upload validate.php to your webserver.
Step 3
To send the required info to the pin check you will have to use the following form:
Code:
<html>
<head><title> Membership validating form </title></head>
<body>
<center><b> Use the form below to activate your pincode, and enjoy premium on your account.</b><br><br>
<form action="validate.php" method="post">
Enter your username: <input type="text" name="name" />
Enter your password <input type="password" name="pass" />
Enter your pincode: <input type="text" name="pin" />
<input type="submit" />
</form>
<br>
<b> Or click <a href="https://daopay.com/svc/pay.svc?tidkey=44919&subkey=1&postrequest=true">here</a> to buy a pin.<br>
</center>
</body>
</html>
- You might have to edit the validate.php if its not in the same directory as form.html
- Again edit the appcode and subkey for daopay.
Save, close, Upload or integrate on portal.
*Notice When putting it on portal, you only have to use the html code from <center> till </center>.
Finished.
Credits 100% Me
Rep ++ would be nice if you use it!
Please dont remove my copyright.
[Only registered and activated users can see links. ] ||| FightScape | InnerFantasy | PkIsle | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
Isn't this asking for problems from Jagex? I really like the idea, but it seems like Jagex's dormant position against private servers will change if we begin to make money off them. (Other than donations I mean.)