Salve a tutti,
un addon per il programma Pixelpost mi sta facendo impazzire.

Chiamando una stringa dovrebbe far comparire una miniatura, invece ottengo una serie di strani caratteri (del tipo �����JFIF���������>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ���C�    $.' ",#(7),01444'9=82<.342���C).

Leggendo qua e là mi pare di avere capito che l'immagine non viene passata al browser come formato immagine a causa di qualche errore, solo che non so come rintracciarlo. Il fatto strano è che ad altre persone questo addon funziona.

Le librerire gd sono abilitate (http://fotoblog.zenigata.it/zenigata/info.php).

Sapreste aiutarmi?

Questo è il codice:

Codice PHP:
<?php 



$addon_name 
"Image link to latest thumb"
$addon_description "Makes a link to Pixelpost's latest thumbnail. "
$addon_version "1.0"

// latest thumb 
if ($_GET['showthumb']=='latest'

   
// get current time 
   
$datetime date("Y-m-d H:i:s"); 
   
$cdate $datetime// for future posting 


   // Get Current Image. 
  
$query mysql_query("select image,headline,datetime,id from ".$pixelpost_db_prefix."pixelpost where datetime<='$cdate' order by datetime DESC limit 0,1"); 


   
$row mysql_fetch_array($query); 
   if(!
$row['image']) { 
       echo 
"Coming Soon (query fail)!"
       
//exit; 
       

   
$image_name         $row['image']; 
   
$image_title        pullout($row['headline']); 
   
$image_id           $row['id']; 
   
$image_datetime     $row['datetime']; 

   
// filename 
   
$filename 'thumbnails/thumb_'.$image_name

   
// if user wants the thumb image 
   
if ($_GET['thumbtag'] =='image'
   { 
       
// put it on the web!
       
if ($_GET['debug'] != 'true')
       {
     
header('Content-Type: image/jpeg');
     
header('Content-transfer-encoding: binary');
       }
     
$img imagecreatefromjpeg($filename);
     
imagejpeg($img);
   exit;
  } 

  if (
$_GET['thumbtag'] == 'getlink'
  { 
   
$img_link "[img]" .$filename ."[/img] " 
    echo 
$img_link 
    exit; 
  } 

   
// if user wants the image title 
  
if ($_GET['thumbtag'] =='title'
  { 

     
// echo    <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 

      //echo "<body><html>"; 

      
echo $image_title
      
//echo "</body></html>"; 
       
exit; 
      } 




?>
Grazie.