Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/21/2020 in all areas

  1. I'm not sure about the "giving" images thing, but If you don't want someone to access a file directly then you don't make it a file they can access directly. Put the image files somewhere not accessible by typing in a URL (meaning they don't go in your public_html or www or whatever directory where your website files go), then create a PHP script that shows the image instead - but only after it runs some other code to make sure it actually should display the image. Basically, <?php // include your common header file or session_start or whatever // figure out what image was requested // ex: /script.php?image=whatever.jpg then $_GET["image"] $image = $_GET["image"]; // look up whether the user can see the image // if they can't then show a "not allowed" image instead (or maybe do something else) if (!$user_can_see_image) { $image = "notallowed.jpg"; } $file = "/path/to/your/images/" . $image; // output the image header("Content-Type: image/jpeg"); // this changes for different types of images! header("Content-Length: " . filesize($file)); readfile($file); After that's in place you can worry about things like making the URL look prettier (maybe /image/whatever.jpg) or enabling caching to save you bandwidth.
    1 point
  2. This is a forum for posting problems and getting answers. It's not good for soliciting individual and personalized help from a single person. You're much more likely to get help by posting your code and asking specific questions instead of hoping someone will come along and decide that they want to do a video chat with a complete stranger. Ready to do that? If all you have left is this thing with a loop and table then this should be pretty quick and easy.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.