Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End File get problem in php Reply To: File get problem in php

#146312
Alen
Participant

Use readfile():

$file_to_get = 'http://media.npr.org/assets/img/2013/05/16/daftpunk02-e8b444451c5efffe911009c9045fb0a382973adf-s6-c30.jpg';
$file_info = getimagesize($file_to_get);
header("Content-type: ".$file_info['mime']);
echo readfile($file_to_get);