View Single Post
  #2  
Old 02-14-2010, 02:08 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 17,426
BMR777 is on a distinguished road
Default RE: Site Suspended - ways to put less strain on the server..?

It's not bandwidth that is the issue, it's the processing power required to load the images from the siggy.php file that is the issue.

Try using the following code in siggy.php instead of the current code:

PHP Code:
<?php

// Lightweight siggy.php file for laggy server...

// Include our Includes...

include("inc/functions.php");
include(
"inc/config.php");

// Get the ID of the adoptable image we want to load...

$id $_GET["id"];
$id preg_replace("/[^a-zA-Z0-9s]/"""$id);
$id secure($id);

if(
is_numeric($id)){

// Run a query to make sure that the adoptable does in fact exist...

$num 0;

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$id'";
$result mysql_query($query);
$num mysql_numrows($result);

    if(
$num 0){

    
// We've got a valid adoptable here, now get the image to use...

    
$image getcurrentimage($id);

    
// Redirect to the image...

    
$location "Location: ".$image;

    
header($location);

    }
    else{

    die(
"The adoptable does not exist or is not valid.");
    
    }



}

?>
It's a special lightweight siggy.php that I use on MyAdopts, which has thousands of requests for signature images. It also doesn't use GD image text, which can eat up processing power very quickly.

Please try this out and let me know if it works better for you. :)
Reply With Quote