isteğin üzerine böyle bişey hazırladım işini görür
<form method="post" enctype="multipart/form-data">
<input type="file" name="dosya" />
<input type="submit" value="upload" />
</form>
<?php
if(!empty($_FILES)){
$uzanti=strrev(substr(strrev($_FILES['dosya']['name']),0,3));
if($uzanti=="rar"){
move_uploaded_file($_FILES['dosya']['tmp_name'],"upload/".$_FILES['dosya']['name']);
}
}
?>