<?php
if($_GET[buton]){
if(file_exists("iplog.txt")){
echo "Dosya zaten mevcut"; //iplog.txt dosyasının var olup olmadığını file_exists() fonksiyonu ile kontrol ettik.
}else{
touch("iplog.txt"); // eğer iplog.txt dizinimizde yoksa touch() fonksiyonu ile oluşturuyoruz.
echo "Dosya yok";
}
}else{
?>
<form action="" method="get">
<input type="submit" name="buton" value="kontrol et">
</form>
<? } ?>