Header("Content-Type: image/jpeg\n"); Header("Content-Disposition: attachment; filename=test.jpeg"); echo "Contents...";