S4l1h adlı üyeden alıntı: mesajı görüntüle
mime type bypass edilebiliniyor dosyanın başın herhangi bir php dosyasının başına GI89a; yazınca gif olarak algılıyor 2. Olarakta http İle veri yollayınca aynı şekilde mime type fake olarak gönderilebiliyor. Başka bir fonksiyo vardı fakat şimdi hatırlayamıyorum.
Aşağıdaki Kodlar sana yardım edebilir.
 function uzantibul($file) {
    $array = explode('.',$file);
    $key   = count($array) -1;
    $ext   = $array[$key];
    return $ext;
    }
$s=strtolower(uzantibul($_FILES[deneme][name]));
$os = array("gif", "png", "jpg", "jpeg"); // izin vermek istediğin dosya türleri
if (!in_array($s, $os)) {
echo("Geçersiz Resim Türü");
exit();
}
Dostum unuttuğun fonksiyonu hatırlasan güzel olucaktı.
upload.php
<?
if (empty($_FILES["resim"]["name"])) {
  echo '
    <script language="javascript">
        alert("Resim seçilmedi seçde gel.");
        history.back();
    </script>';
exit;
}
$kaynak = $_FILES["resim"]["tmp_name"]; 
$dosya = str_replace(" ", "_", $_FILES[resim][name]);
$uzanti = explode(".", $_FILES[resim][name]);
$hedef  = "upload/".$dosya;
if ($uzanti[1] == "jpg" || $uzanti[1] == "bmp" || $uzanti[1] == "JPG" || $uzanti[1] == "gif" || $uzanti[1] == "GIF" || $uzanti[1] == "png" || $uzanti[1] == "PNG" || $uzanti[1] == "TIF" || $uzanti[1] == "TIFF" ) {
if (file_exists($hedef)) {
    $hmz = substr(md5(uniqid(rand())),0,8);
    $hedef = "upload/$hmz-".$dosya;
    $dosya = "$hmz-".$dosya;
}
move_uploaded_file($kaynak,$hedef);
echo " dosya eklendi link: $hedef ";
} else
{ echo " geçersiz dosya tipi "; }
?>
index.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" enctype="multipart/form-data" method="post" action="upload.php">
  <input name="resim" type="file" id="resim">
  <br>
  <br>
  <input name="submit" type="submit" id="submit" value="y&uuml;kle gitsin">
</form>
</body>
</html>
resmi upload klasörüne yüklüyor verdiğin kodları nasıl entegre edicem?