Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

saving an image from pc to php

<?php
  
$url = 
'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-6-1.png'; 
  
$img = 'logo.png'; 
  
// Function to write image into file
file_put_contents($img, file_get_contents($url));
  
echo "File downloaded!"
  
?>
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #saving #image #pc #php
ADD COMMENT
Topic
Name
6+4 =