%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/alliance/domains/congress-intercultural.eu/public_html/phpThumb/
Upload File :
Create Path :
Current File : /home/alliance/domains/congress-intercultural.eu/public_html/phpThumb/phpThumbgen.php

<?php

include_once("../inc/config.php");
require_once($_SERVER['DOCUMENT_ROOT'].'/phpThumb/phpThumb.config.php');
//require_once($_SERVER['DOCUMENT_ROOT'].'/srv01/sedlplateforme/phpThumb/phpThumb.config.php');
//Renvoie le lien de l'image taillée ou redimentionnée (src à la racine)
$res = "photos/";
$res2="src=".$_GET['src'];
if(isset($_GET['w']) && $_GET['w']){ 
	$res .= "w".$_GET['w']."/";
	$res2.="&w=".$_GET['w'];
}
if(isset($_GET['h']) && $_GET['h']){
	$res .= "h".$_GET['h']."/";
	$res2.="&h=".$_GET['h'];
}
if(isset($_GET['zc'])){
	$res .= "zc/";
	$res2.="&zc=1";
}
/*if(file_exists("uploads/".$_GET['src'])){
	$res .= $_GET['src'];
}
else{
	$res .= "no-img.jpg";
}*/
$res2.="&q=100";
$img_url=$url_site.phpThumbURL($res2,'phpThumb/phpThumb.php');

$contents = file_get_contents($img_url);
$pattern = "/^content-type\s*:\s*(.*)$/i";
if (($header = array_values(preg_grep($pattern, $http_response_header))) &&
    (preg_match($pattern, $header[0], $match) !== false))
{
    $content_type = $match[1];
    //echo "Content-Type is '$content_type'\n";
	header('Content-type: '.$content_type);
	echo $contents;
}
//header('Content-type: image/jpeg');
//echo file_get_contents($url_site.phpThumbURL($res2,'phpThumb/phpThumb.php'));

Zerion Mini Shell 1.0