www.webdeveloper.com
Results 1 to 8 of 8

Thread: Reading image source out of other Page

  1. #1
    Join Date
    Jan 2011
    Posts
    4

    Reading image source out of other Page

    Hello,

    I'm new here and new to JavaScript. There's a thing I would need for my website: I want to include an image from an other site. But it's url is changing every day because the image changes every day.
    (That's the site: http://apod.nasa.gov/apod/)

    How can I find out the image url with javascript and show it on my website?

    Thanks in advance!

    Okuro

  2. #2
    Join Date
    Jan 2011
    Location
    San Francisco
    Posts
    19
    You can do this, but maybe you shouldn't? That page has a disclaimer about image permissions:
    http://apod.nasa.gov/apod/lib/about_apod.html#srapply
    which specifically doesn't allow unlimited reproduction. I admit that it's very unlikely that you will have any legal trouble with this, but it's not considered good form to run other people's content on your site without permission.

  3. #3
    Join Date
    Jan 2011
    Posts
    4
    Hello,

    I see, thanks for the tip!

    Anyway, how would it work if it was legal? (on other websites...)

    Thanks!

  4. #4
    Join Date
    Jan 2011
    Posts
    4
    any ideas?

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by Okuro View Post
    Anyway, how would it work if it was legal?
    But it is not. Period.

  6. #6
    Join Date
    Jan 2011
    Posts
    4
    Quote Originally Posted by Kor View Post
    But it is not. Period.
    Indeed, I referred to other NASA-Websites where the images aren't protected with copyright and everybody is allowed to use them as often and where ever they want if they quote NASA.

  7. #7
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by Okuro View Post
    Indeed, I referred to other NASA-Websites where the images aren't protected with copyright and everybody is allowed to use them as often and where ever they want if they quote NASA.
    Maybe. But inserting in your page an absolute url to a picture which belongs to another domain is not recommended. Don't confound the rights to use a picture with the rights to insert a link to that picture.

    You may use a combination AJAX+server-side proxy code. If your server allows PHP, see:
    http://www.troywolf.com/articles/

    You should rather use a server-side code to load that picture into your domain and use it from your domain. Of course, mentioning who is the owner, and the rest of courtesy, etc.
    Last edited by Kor; 01-27-2011 at 02:12 PM.

  8. #8
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    NASA cannot copyright their images or text: they are a US government agency and as such are banned from holding copyrights by our constitution.

    that's why i embed the APOD on the front page of a site i built: http://www.astro.uiuc.edu/


    we haven't gotten any cease-and-desist letters yet; not holding my breath.

    i used a small asp script to grab the html from the APOD site and sniff out the image url.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles