Skip to content

Commit 33a051f

Browse files
authored
Update README.md
1 parent 06f0744 commit 33a051f

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

README.md

+23-19
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
# KeyAuth-PHP-Example
22
PHP Example For https://keyauth.cc Authentication System
33

4-
Video Tutorial:
4+
#### **Video Tutorial:**
55

66
<a href="http://www.youtube.com/watch?feature=player_embedded&v=hU6yXGR5R1Y
7-
" target="_blank"><img src="https://i.imgur.com/Cd6DbXD.png"
7+
" target="_blank"><img src="https://i.imgur.com/IFHFaiI.png"
88
alt="Click here to see Installation Video!" width="500" height="250" border="10" /></a>
99

10-
## Anti-DDoS Security
10+
#### **Bugs**
11+
12+
If the default example not added to your software isn't functioning how it should, please join the Discord server https://discord.gg/keyauth and submit the issue in the `#bugs` channel.
13+
14+
However, we do **NOT** provide support for adding KeyAuth to your project. If you can't figure this out you should use Google or YouTube to learn more about the programming language you want to sell a program in.
15+
16+
#### Anti-DDoS Security
1117

1218
Please add a Cloudflare firewall rule to show challenge to users, then set challenge passage to 1 year so they don't have to frequently complete challenge
1319
![image](https://user-images.githubusercontent.com/83034852/168191187-236e8be7-1b1c-4398-9360-462baa800fac.png)
1420
![image](https://user-images.githubusercontent.com/83034852/168191204-d553f134-943b-466e-a98f-255fbab204c6.png)
1521

1622

17-
**What is KeyAuth?**
23+
#### **What is KeyAuth?**
1824

19-
KeyAuth is an Open source authentication system with cloud hosting plans as well. Client SDKs available for C++, C#, Python, Rust, PHP, JS and VB.NET.
20-
KeyAuth several unique features such as memory streaming, webhook function where you can send requests to API without leaking the API, discord webhook notifications, ban the user securely through the application at your discretion.
21-
Feel free to join https://discord.gg/keyauth if you have questions or suggestions.
25+
KeyAuth is an Open source authentication system with cloud hosting plans as well. Client SDKs available for [C#](https://github.com/KeyAuth/KeyAuth-CSHARP-Example), [C++](https://github.com/KeyAuth/KeyAuth-CPP-Example), [Python](https://github.com/KeyAuth/KeyAuth-Python-Example), [Java](https://github.com/SprayDown/KeyAuth-JAVA-api), [JavaScript](https://github.com/mazkdevf/KeyAuth-JS-Example), [VB.NET](https://github.com/KeyAuth/KeyAuth-VB-Example), [PHP](https://github.com/KeyAuth/KeyAuth-PHP-Example), [Rust](https://github.com/KeyAuth/KeyAuth-Rust-Example), [Go](https://github.com/mazkdevf/KeyAuth-Go-Example), [Lua](https://github.com/mazkdevf/KeyAuth-Lua-Examples), [Ruby](https://github.com/mazkdevf/KeyAuth-Ruby-Example), and [Perl](https://github.com/mazkdevf/KeyAuth-Perl-Example). KeyAuth has several unique features such as memory streaming, webhook function where you can send requests to API without leaking the API, discord webhook notifications, ban the user securely through the application at your discretion. Feel free to join https://discord.gg/keyauth if you have questions or suggestions.
2226

23-
**`KeyAuthApp` instance definition**
27+
#### **`KeyAuthApp` instance definition**
2428

2529
Visit and select your application, then click on the **PHP** tab
2630

@@ -30,15 +34,15 @@ It'll provide you with the code which you should replace with in the `Program.cs
3034
$KeyAuthApp = new KeyAuth\api("appNameHere", "keyAuthOwnerIDHere");
3135
```
3236

33-
**Initialize application**
37+
#### **Initialize application**
3438

3539
You must call this function prior to using any other KeyAuth function. Otherwise the other KeyAuth function won't work.
3640

3741
```php
3842
$KeyAuthApp->init();
3943
```
4044

41-
**Display application information**
45+
#### **Display application information**
4246

4347
```php
4448
$numKeys = $_SESSION["numUsers"];
@@ -47,23 +51,23 @@ $numOnlineUsers = $_SESSION["numOnlineUsers"];
4751
$customerPanelLink = $_SESSION["customerPanelLink"];
4852
```
4953

50-
**Login with username/password**
54+
#### **Login with username/password**
5155

5256
```php
5357
if ($KeyAuthApp->login("userNameHere", "passWordHere")) {
5458
// send user to dashboard or wherever you prefer
5559
}
5660
```
5761

58-
**Register with username/password/key**
62+
#### **Register with username/password/key**
5963

6064
```php
6165
if ($KeyAuthApp->register("userNameHere", "passWordHere", "licenseKeyHere")) {
6266
// send user to dashboard or wherever you prefer
6367
}
6468
```
6569

66-
**Upgrade user username/key**
70+
#### **Upgrade user username/key**
6771

6872
Used so the user can add extra time to their account by claiming new key.
6973

@@ -77,7 +81,7 @@ if ($KeyAuthApp->upgrade("userNameHere", "licenseKeyHere")) {
7781
}
7882
```
7983

80-
**Login with just license key**
84+
#### **Login with just license key**
8185

8286
Users can use this function if their license key has never been used before, and if it has been used before. So if you plan to just allow users to use keys, you can remove the login and register functions from your code.
8387

@@ -87,7 +91,7 @@ if ($KeyAuthApp->license("licenseKeyHere")) {
8791
}
8892
```
8993

90-
**User Data**
94+
#### **User Data**
9195

9296
Show information for current logged-in user.
9397

@@ -101,7 +105,7 @@ for ($i = 0; $i < count($subscriptions); $i++) {
101105
}
102106
```
103107

104-
**Check subscription name of user**
108+
#### **Check subscription name of user**
105109

106110
If you want to wall off parts of your app to only certain users, you can have multiple subscriptions with different names. Then, when you create licenses that correspond to the level of that subscription, users who use those licenses will get a subscription with the name of the subscription that corresponds to the level of the license key they used. The `SubExist` function is in the `Program.cs` file
107111

@@ -114,7 +118,7 @@ else {
114118
}
115119
```
116120

117-
**Application variables**
121+
#### **Application variables**
118122

119123
A string that is kept on the server-side of KeyAuth. On the dashboard you can choose for each variable to be authenticated (only logged in users can access), or not authenticated (any user can access before login). These are global and static for all users, unlike User Variables which will be dicussed below this section.
120124

@@ -124,7 +128,7 @@ $var = $KeyAuthApp->var("varName");
124128
echo "Variable Data: " . $var;
125129
```
126130

127-
**User Variables**
131+
#### **User Variables**
128132

129133
User variables are strings kept on the server-side of KeyAuth. They are specific to users. They can be set on Dashboard in the Users tab, via SellerAPI, or via your loader using the code below. `discord` is the user variable name you fetch the user variable by. `test#0001` is the variable data you get when fetching the user variable.
130134

@@ -141,7 +145,7 @@ $var = $KeyAuthApp->getvar("varName");
141145
echo "Variable Data: " . $var;
142146
```
143147

144-
**Application Logs**
148+
#### **Application Logs**
145149

146150
Can be used to log data. Good for anti-debug alerts and maybe error debugging. If you set Discord webhook in the app settings of the Dashboard, it will send log messages to your Discord webhook rather than store them on site. It's recommended that you set Discord webhook, as logs on site may be deleted after a couple months of their creation.
147151

0 commit comments

Comments
 (0)