[security] user can't know location photo [security] user can't know location photo
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[security] user can't know location photo

Started by Bart, March 12, 2004, 01:13:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bart

I have problem becouse I don't want to user clicking right button mouse's on photo had the possibility of checking where is photo on server. Now has the possibility to write down address of photo and he can see it with out log in.:( Have You some ideas how I can solve this problem  :?:
Bart

Joachim Müller

sure: don't post the pic on the internet! :roll:
That's the way a webbrowser works. You could try fiddling with "no right-click" scripts (using JavaScript) and other silly methods, but generally speaking: there is nothing you can do about this!

GauGau

Tarique Sani

SANIsoft PHP applications for E Biz

hyperion

Anyone can get to your files if they really want to, so you can only make it difficult.

For example, you worry that people will be able to see your files without logging in.  Okay, so what do you do if a user logs in and downloads your files? He can then view them on his personal computer, post them on his site, etc.  Right click scripts can be disabled, and URL obsfucation is made irrelevant by the browser cache. If they can see it in their browser, they can get it.

However, if you are determined to proceed along this futile course, I suggest you read the following threads and pages:

http://forum.coppermine-gallery.net/index.php?topic=3069 [edit]Seems you beat me to it, Tarique.  :) [/edit]
http://forum.coppermine-gallery.net/index.php?topic=2450
http://altlab.com/htaccess_tutorial.html
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Casper

And you could make it that users have to login before they can see any pics.  There's no point in worying if the user is registered anyway, is there.

see http://forum.coppermine-gallery.net/index.php?topic=3503
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Bart

OK guys ... calmly ... I need solution with .htaccess and login to gallery or any good way. I want users can save photos on they hard drivers but I don't want they post link to jpg file somewhere and someone no register user can see that jpg file. For example user who have account login to gallery and get link to jpg file and he/she put that link on another site then anyone can have access to my photo - I don't want that so how I can do it?

What You think about it:


<?php 
if (!isset($_COOKIE['ActiveCode'])) { 
    unset(
$_COOKIE[session_name()]); 
    
$name 'access.denied.jpg'

else { 
   if (isset(isset(
$_GET['name']))) { 
      
$name $_GET['name']; 
   } 
   else { 
      
$name 'some.jpg'
   } 


$photo_dir 'secret_catalog/'

$name $photo_dir $name

header('Content-type: image/jpeg'); 
header('Content-transfer-encoding: binary'); 
header('Content-length: 'filesize($name)); 

readfile($name); 
?>
Bart

Joachim Müller

If you want to keep people from displaying your pics on their site (stealing your bandwidth), there are instructions how to prevent this: search the board for "prevent AND hotlinking".
You can't keep people from entering the url of the pic into the browser though.

GauGau

Bart

Quote from: "gaugau"You can't keep people from entering the url of the pic into the browser though.

GauGau

I can  :D  and I know how!
Bart

Joachim Müller

OK, cool. Thanks for sharing your thoughts...
Maybe you could post a link to your gallery for us to check your modifications...?

GauGau