On some DJ Panels there is a script were users can only view a page once dose any one no it
Printable View
On some DJ Panels there is a script were users can only view a page once dose any one no it
PHP is logical so it would be something like $user view="page.php" 1> echo = "page content" else $user view="page.php" 1< echo="lol no".
I'm not good at thinking logically but the first thing that comes to my head is having a mysql db and inserting the users IP into it and checking if the user has viewed thepage using their IP if so tell them no if not let them view:
There might be a much easyer way to do this I just can't think atm. Hope it helps.PHP Code:<?php
$dbuser = "username";
$dbpass = "pass";
$dbname = "databasename";
$dbhost = "localhost";
//Change the values to your details for accessing the database..
$connect = mysql_connect($host, $dbuser, $dbpass);
mysql_select_db($dbname, $connect);
//Connect to the database..
$ip = $_SERVER['REMOTE_ADDR'];
//The users IP
$get = mysql_query("SELECT * FROM `tablename` WHERE `ip` = '" . $ip . "'");
//Check the database for any maches..
if(mysql_num_rows($get) > 0)
{
echo("No access already been viewed by this person..");
}
else
{
echo("Page content..");
mysql_query("INSERT INTO `tablename` (`ip`) VALUES ('" . $ip . "')");
//Add the users IP to the db to prevent them from accessing again..
}
?>