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'>";
}
?>
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'>";
}
?>
img upload in php
if(isset($_FILES['image']))
{
$img_name = $_FILES['image']['name']; //getting user uploaded name
$img_type = $_FILES['image']['type']; //getting user uploaded img type
$tmp_name = $_FILES['image']['tmp_name']; //this temporary name is used to save/move file in our folder.
// let's explode image and get the last name(extension) like jpg, png
$img_explode = explode(".",$img_name);
$img_ext = end($img_explode); //here we get the extension of an user uploaded img file
$extension= ['png','jpeg','jpg','gif']; //these are some valid img extension and we are store them in array.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us