<?php $date = Date("YmdHis").".jpg"; file_put_contents('upload/'.$date, file_get_contents($_POST['url'])); echo $date; ?>