Im generating Identicons using a php script.
Showing the result using a <img>
works fine
$input="create_image/identicon.php?size=48&hash=$hashvalue";
$output=$username."_userimage.png";
This works:
echo "<img src='$input'>";
But this doesn't: (It just creates an empty file)
file_put_contents($output, file_get_contents($input));
and throws a no such file or directory
exception, tho its the same url as the one used for the src property showing the image.
What is the problem trying to save it like that?
Im not sure whether the problem is the file_put_contents
or the file_get_contents