mirror of
https://github.com/gamaio/unps.us-Shortener.git
synced 2024-12-22 02:02:40 +00:00
Revert "Move APIKey to different file"
This reverts commit c1c557ed07
.
Conflicts:
api/dbsettings.php
This commit is contained in:
parent
817bc47362
commit
c2fe7d6106
@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
// DBSettings
|
// DBSettings
|
||||||
|
|
||||||
global $apidb = new mysqli('localhost', 'api', 'password', 'api'); // Connect to main APIDB
|
$apidb = new mysqli('localhost', 'api', 'password', 'api'); // Connect to main APIDB
|
||||||
if($apidb->connect_errno > 0) die('Unable to connect to database [' . $apidb->connect_error . '] - Check dbsettings.php');
|
if($apidb->connect_errno > 0) die('Unable to connect to database [' . $apidb->connect_error . '] - Check dbsettings.php');
|
||||||
|
|
||||||
global $shortdb = new mysqli('localhost', 'short', 'password', 'short'); // Connect to link shortener DB
|
$shortdb = new mysqli('localhost', 'short', 'password', 'short'); // Connect to link shortener DB
|
||||||
if($shortdb->connect_errno > 0) die('Unable to connect to database [' . $shortdb->connect_error . '] - Check dbsettings.php');
|
if($shortdb->connect_errno > 0) die('Unable to connect to database [' . $shortdb->connect_error . '] - Check dbsettings.php');
|
||||||
|
|
||||||
global $key = '9a211e90b0a0570ed33e47428231e702af47b6f54fb347960f661184e063a1d0'; // KEEP THIS PRIVATE! This is the only thing that authenticates the application
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -8,6 +8,8 @@
|
|||||||
require('api/api.backend.php');
|
require('api/api.backend.php');
|
||||||
require('api/dbsettings.php');
|
require('api/dbsettings.php');
|
||||||
|
|
||||||
|
$key = '9a211e90b0a0570ed33e47428231e702af47b6f54fb347960f661184e063a1d0'; // KEEP THIS PRIVATE! This is the only thing that authenticates the application
|
||||||
|
|
||||||
function sanitize($input){
|
function sanitize($input){
|
||||||
if ($input == null) die("<div id=\"error\">Sanatize() - No Input Provided, Aborting</div>");
|
if ($input == null) die("<div id=\"error\">Sanatize() - No Input Provided, Aborting</div>");
|
||||||
include('api/dbsettings.php');
|
include('api/dbsettings.php');
|
||||||
|
Loading…
Reference in New Issue
Block a user