Blocked showing of the images ???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mahroch
Forum Newbie
Posts: 5
Joined: Mon Jan 19, 2009 5:40 am

Blocked showing of the images ???

Post by mahroch »

Hi,
Solving other problem I found an interesting feature on one site I used as example.

At the page (pls open in eg. Firefox http://www.fotobanka.cz/main.php?query= ... ey&x=0&y=0 you can find one czech microstock photobank. Obviously you can see some images there.

Now I will talk about first image in the row - ID: 938788. If you look at the properties of the image, yo can see the url to the image thumbnail which is http://img.fotobanka.cz/preview/small/938788.jpg. But if you try to open it in other browser as you opened the first url - eg. IE, than you will get different image - exclamation mark with sign of 'not allowed'.

The same happens if you want to show the thumbnail from your testing page:
<html><head></head><body>
<img src="http://img.fotobanka.cz/preview/small/938788.jpg">
</body></html>
If you open both urls in the same browser, the image is showed correctly.

Is there any possibility how to let the example script I quoted above show the image correctly ?

Thanx

Maros
machinehead933
Forum Newbie
Posts: 7
Joined: Tue Jan 20, 2009 10:48 pm

Re: Blocked showing of the images ???

Post by machinehead933 »

This is most likely being done through the use of an .htaccess file to prevent "hotlinking"

Hotlinking is the undesirable practice of using an image from someone else's site in your your own. This saves bandwidth on your server, while increasing bandwidth on someone else's.

So for example, a hotlinked image in your own code might look like this:

Code: Select all

<img src="http://www.someotherdomain.com/someimage.jpg alt="hotlinked image" />
There won't be a workaround if the host for img.fotobanka.cz is using this in practice. You'll need to find an image that is public domain, or you have rights to use on your site.

--
Vincent Gerbino
HostMySite Technical Support, Manager
vinny@hostmysite.com
http://www.HostMySite.com/?utm_source=bb
Post Reply