Author Topic: Pic Security  (Read 160505 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Pic Security
« Reply #60 on: December 29, 2005, 03:53:26 AM »
If you are refering to remote located files (when used URL for the file), then its not possible.
Otherwise, try replace
Code: [Select]
    if (!$image_info = @getimagesize($file) || is_remote_file($file) || !$mime = $mime_type_match[get_file_extension($file)][0])with:
Code: [Select]
    if (is_remote_file($file) || !$mime = $mime_type_match[get_file_extension($file)][0])but I doubt it will help, because you did not explain what doesnt work EXACTLY, so I dont know where to look ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline lorddean

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • ElitePhoto.eu
Re: Pic Security
« Reply #61 on: December 29, 2005, 10:58:28 PM »
I might be stupid, but how do I implement the codes in

« Reply #1 on: March 24, 2005, 03:39:31 AM »

1) In which folders should I place the 3 files? (.htaccess, read_image.php and view_image.php)

2) Are there any other files I have to modify to activate the code? And if so, what modifications should I make?

Best regards


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Pic Security
« Reply #62 on: December 30, 2005, 12:44:00 AM »
To which code are you reffering to? post a link to the reply please.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline lorddean

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • ElitePhoto.eu
Re: Pic Security
« Reply #63 on: December 30, 2005, 09:14:22 AM »
Insert Quote
I might be stupid, but how do I implement the codes in

« Reply #1 on: March 24, 2005, 03:39:31 AM »
http://www.4homepages.de/forum/index.php?topic=6997.msg30699#msg30699
(It's the first reply under this subject, Pic Security)

1) In which folders should I place the 3 files? (.htaccess, read_image.php and view_image.php)

2) Are there any other files I have to modify to activate the code? And if so, what modifications should I make?

Best regards

Offline osmel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pic Security
« Reply #64 on: January 01, 2006, 09:00:53 PM »
thank you very much for everything!
it worked after all and sorry for the PMs i didnt know  :oops:


actually... its only working witn IE  8O

Offline osmel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pic Security
« Reply #65 on: January 01, 2006, 09:09:38 PM »
i tried mozilla and opera and they dont work with the mod, but it works on IE :S any idea why?
and im getting the image pic_error.gif

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Pic Security
« Reply #66 on: January 01, 2006, 09:15:07 PM »
Its because for some reason media player requests 3 times the media file! that's why its getting expired too soon.
Another thing, it redirects to the media file, so its not really hiding the location...

So try this: In show.php replace
Code: [Select]
   $site_sess->set_session_var("downloadpic", $pic[0]." ".$pic[1]." ".($pic[2]-$reduce));
    if (!$image_info = @getimagesize($file) || is_remote_file($file) || !$mime = $mime_type_match[get_file_extension($file)][0])
with:
Code: [Select]
   $ext = get_file_extension($file);
    if (in_array($ext, array("wmv","mp3","mpg","mpeg","avi","mov","wma","ogg")))
    {
      $reduce = 0;
      $image_info = 1;
    }
    else
    {
      $image_info = @getimagesize($file);
    }
    $site_sess->set_session_var("downloadpic", $pic[0]." ".$pic[1]." ".($pic[2]-$reduce));
    if (!$image_info || is_remote_file($file) || !$mime = $mime_type_match[$ext][0])
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline osmel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pic Security
« Reply #67 on: January 01, 2006, 09:37:05 PM »
tried that im getting this
 


and i was using 6000 seconds in expire

Offline osmel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pic Security
« Reply #68 on: January 01, 2006, 09:58:59 PM »
actually is not that one, its this one...

Code: [Select]
else
{
  $file = "no/pic_error.gif";
}
$file = @file_get_contents($file);

Offline lorddean

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • ElitePhoto.eu
Re: Pic Security
« Reply #69 on: January 01, 2006, 11:16:24 PM »
I might be stupid, but how do I implement the codes in

« Reply #1 on: March 24, 2005, 03:39:31 AM »
http://www.4homepages.de/forum/index.php?topic=6997.msg30699#msg30699
(It's the first reply under this subject, Pic Security)

1) In which folders should I place the 3 files? (.htaccess, read_image.php and view_image.php)

2) Are there any other files I have to modify to activate the code? And if so, what modifications should I make?

Best regards

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Pic Security
« Reply #70 on: January 01, 2006, 11:39:50 PM »
It was more like a theory for these who understand. You should continue reading the topic, because there are few "practical" codes posted based on that theory.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline osmel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pic Security
« Reply #71 on: January 02, 2006, 01:20:37 AM »
so any idea what could be causing opera/mozilla to not work and only IE???

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Pic Security
« Reply #72 on: January 02, 2006, 06:34:21 AM »
I dont know, maybe because it reports a wrong mime type (make sure the first type for your file extension that is set in includes/upload_definitions.php is correct) and because its using media player v6.4 plugin...maybe
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Pic Security
« Reply #73 on: January 02, 2006, 02:10:49 PM »
It might also be for the fact that Media Player 10 is more familiarized with IE than Firefox.

Offline osmel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Pic Security
« Reply #74 on: January 02, 2006, 10:31:18 PM »
i have this on my upload definitions file

$mime_type_match['wmv'] = array("video/x-ms-wmv");

is that correct?