I wrote a small utility which helps compare films using an (un-official) API available at imdbapi.com
The api even returns the path of the film poster which I intend to display on my page. The issue that I am running into is that even though the element is created correctly along with the correct path, I get a blank placeholder when I deploy the site online in place of the image.
The images load up while testing on localhost - but don t work online.
Another weird part is that if I have already searched for a film locally and hence have the image cached, that shows up while searching for the same film online - but new posters don t load up.
The source code and everything is online at: http://compovie.com
It s completely in JS - no server side scripting used.
This is really driving me nuts and any help would be appreciated. I have tested this and behaviour repeats in FF 3.6, IE8 and Chrome.
Thanks.
-- Edit 19-Feb-2010 --
The PHP script snippet that I used to get this to work is:
header( Content-Type: image/jpeg );
if(isset($_GET["imgUrl"])) {
$img = file_get_contents($_GET["imgUrl"]);
echo $img;
}