can someone help me find the best and easiest method to transfer a file/image from a server in php to a client pc, it needs to download/transfer the file to the clients computer when the function is executed this is the function i need it in:
<?php
function download($content){
file_put_contents('./img/meme-temp.png', file_get_contents($content));
`code to download file`
unlink('./img/meme-temp.png');
}
?>
it needs to be in either html, javascript or php i have tried varius methods including using the html download property and javascript autoclick on outputted downloadlinks