Answers for "php upload from url"

PHP
0

php upload from url

<?php
if(isset($_POST['get_image']))
{
 $url=$_POST['img_url'];
 $data = file_get_contents($url);
 $new = 'images/new_image.jpg';
 file_put_contents($new, $data);
 echo "<img src='images/new_image.jpg'>";
}
?>
Posted by: Guest on July-16-2020

Browse Popular Code Answers by Language