<?php $contents = file_get_contents($_POST['zdjecie']); $img = Date("YmdHis"); $fp = fopen('gotowe/'.$img.'.png', 'w'); fwrite($fp, $contents); fclose($fp); echo 'http://'.$_SERVER['HTTP_HOST'].'/gotowe/'.$img.'.png'; ?>