<?php
/* Update these three values after creating the database in cPanel. */
if(!defined('TRAFFIC_DB_HOST')){
  define('TRAFFIC_DB_HOST', 'localhost');
  define('TRAFFIC_DB_USER', 'CPANEL_DB_USER');
  define('TRAFFIC_DB_PASS', 'CPANEL_DB_PASSWORD');
  define('TRAFFIC_DB_NAME', 'CPANEL_DB_NAME');
}

$conn = new mysqli(TRAFFIC_DB_HOST, TRAFFIC_DB_USER, TRAFFIC_DB_PASS, TRAFFIC_DB_NAME) or die("Connect failed: %s\n".$conn->connect_error);

function traffic_db_connect(){
  return mysqli_connect(TRAFFIC_DB_HOST, TRAFFIC_DB_USER, TRAFFIC_DB_PASS, TRAFFIC_DB_NAME);
}
?>

