$value = $_POST['file_url']; $info = getimagesize($value); if (!empty($info)) { $photo_name = strtolower(strrchr($value,"/")); $FILES = file_get_contents($value); file_put_contents("путь к папке/".$photo_name, $FILES); } else { die('Bad File Url'); }