Welcome Guest, Not a member yet? Register   Sign In
Restrict direct image viewing
#6

[eluser]Chris Williams[/eluser]
Hey Lone!

Thanks for the input.

I didn't see any get_mimetype function in the user guide, but I don't think it makes a difference either way. If I hard code the actual address instead of looking it up in the db, I'm not getting it to display anything.

Code:
$path = '/secret_directory/this_image.png';
        
$mimetype = get_mime_by_extension($path); // will need file_helper loaded
ob_get_clean();
header('Content-Type: '.$mimetype);
ob_flush();

So when I call it from /index.php/index/view by itself, Firefox tells me it contains errors. I'm a little too novice to tell what's not working.


Messages In This Thread
Restrict direct image viewing - by El Forum - 06-05-2008, 06:11 PM
Restrict direct image viewing - by El Forum - 06-06-2008, 12:28 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 12:40 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 01:05 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 01:50 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 01:14 PM
Restrict direct image viewing - by El Forum - 06-07-2008, 12:41 PM
Restrict direct image viewing - by El Forum - 06-07-2008, 06:18 PM
Restrict direct image viewing - by El Forum - 06-08-2008, 02:06 AM
Restrict direct image viewing - by El Forum - 06-09-2008, 02:17 AM
Restrict direct image viewing - by El Forum - 06-09-2008, 06:52 PM
Restrict direct image viewing - by El Forum - 06-09-2008, 08:09 PM
Restrict direct image viewing - by El Forum - 06-10-2008, 09:03 AM
Restrict direct image viewing - by El Forum - 06-10-2008, 10:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB