ahmed_sadman — 2013-08-16T13:27:53-04:00 — #1
WEBSITE NOT WORKING WHEN HOSTED!!!
Please please help me. This is my first created website. My problem is very strange. After weeks of hard work, when I am seeing my website is not working, I have started crying
The problem is, website is working correctly in my computer+LOCALHOST. But when I host website, the website is not working. I have tried tried 2 free different webhosts and currently using JABRY.net I cannot but use free hosts like this.
Website is simple. It delivers your movie posters using the open API omdbapi.com. Posters are not loading when I host the website, but all the functions are working correctly in my PC. Very strange! Try it yourself.
fretburner — 2013-08-16T22:01:44-04:00 — #2
Your code seems to be working OK - the problem is that when you try to load the poster image, the IMDB server is returning a 403 (forbidden) error. From what I can gather, this is deliberate and is some sort of measure to prevent people hotlinking to their images.
ahmed_sadman — 2013-08-17T07:14:29-04:00 — #3
Then how can I load the poster, this is an API, isn't it? I should have access to the images. And if you are right, then it should not work when I try it in my PC locally. But acutually, it's working locally.
fretburner — 2013-08-17T08:03:32-04:00 — #4
You do have access to the images - you can copy the URL, paste it into your browser, and it will work just fine - but if you try to pull it in from your script then you get the 403 error. Probably running it on your local machine doesn't trigger whatever mechanism IMDB use to protect their images, but once you run it from a webserver it does.
Here are the links I found from googling the problem, then you don't have to take my word for it:
mittineague — 2013-08-17T13:24:27-04:00 — #5
Yes, it is an API. And it is working. It is sending the URL of another site ~not~ the image.
Perhaps you can contact the API's site owner and convince them to host the images on their site?