php - Is it possible not having to browse for a file in your computer at an input field of type file, but to take it from another website? -
there website wants me upload profile picture. uses usual form <input type="file">
.
then there website b, has picture have in profile on website a.
but upload picture website b on a, without having download on pc. instead change form on website tampermonkey (as example) takes picture directly website b.
try code
$image = imagecreatefromstring(file_get_contents($imageurl)); if (is_resource($image) === true) { // image valid, code } else { // not valid image, show error }
see documentation here: http://php.net/manual/en/function.imagecreatefromstring.php
Comments
Post a Comment