Jump to content

ryanfilard

Members
  • Posts

    252
  • Joined

  • Last visited

Posts posted by ryanfilard

  1. Don't store images in a zip file if you intend to unzip the image each time. It will cause the server to work harder and even cause slow loading time. If you are looking to save space use the jpeg format.

  2. I am trying to create for the first time a lock out system on my CMS. So is the code below sufficient for locking out impostors. This code is included onto the login page and has a few other files to help support it.

    <?PHP
    $ip = $_SERVER['REMOTE_ADDR'];
     include("../Connections/default.php");
         mysql_select_db($database_default, $default);
         $query_uvs2 = "SELECT * FROM login WHERE `ip` = '".$ip."' ";
         $uvs2 = mysql_query($query_uvs2, $default) or die(mysql_error());
    	 $total_fails = mysql_num_rows($uvs2);
    if($_REQUEST["error"] == "1")
    {
    	 
    $lockout = "10";//Maximum lockout attempts.
    
    if($total_fails >= $lockout)
    {
    	include('functions/standard.php');
    	date_default_timezone_set("America/New_York");
    	e_log("security", "IP Ban for Brute Force (Possibly Page Refreshing)",$_SERVER['REMOTE_ADDR']);
    	die("One does not simply brute force, to appeal this IP ban please empty the table login");
    }
    else
    {
    	include("../Connections/default.php");
    	mysql_select_db($database_default, $default);
    	$addmenu = "INSERT INTO login (`ip`) VALUES ('$ip')";
    	mysql_query($addmenu, $default) or die(mysql_error());
    }
    }
    ?>
    
  3. I recently purchased a new server and it was working yesterday, the only problem is I turned it off and on again now the site won't load. The admin panel works remotely but the site is down. All Help would be appreciated.

  4. User is text, friend is text, and accepted is one

     

    JlyQy.png

    This is what I am using to display the data

    mysql_select_db($database_main, $main);
    $query_userfriends = "SELECT * FROM friends WHERE `friend` = '$uid' LIMIT 9";
    $userfriends = mysql_query($query_userfriends, $main) or die(mysql_error());
    $row_userfriends = mysql_fetch_assoc($userfriends);
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.