Get images from url

Discussion in 'Web Design and Development' started by VonBP, Jul 2, 2010.

  1. VonBP macrumors newbie

    Joined:
    Jul 2, 2010
    #1
    Hi There!

    This is what i want to do: i want users tu complete a form, and in that form enter a URL, that URL has some images that i need to add to a html.

    When someone completes the form, is sent to my mail. But the important thing here is that my form sends me a .html file, basically a webpage, but with the information users submited. I want to display one of the images of the URL that they entered in my html. So they enter a URL, for example appple.com, and i get in my html appple.com/image1.png

    The other day, found this site apptrackr.org, and i studied it, and when you submit an app, you enter the itunes url of the app, and it automatically gets the images and info, i want something similar.

    Any ideas? Hope it isn't to complicated.
    Thanks!
     
  2. kingthias macrumors member

    Joined:
    Feb 11, 2009
    #2
    This isn't the complete solution but google images offers code for custom searches so the following code will return all images that fit a search in a website. You could also just show all pictures.

    HTML:
    /*
     *  How to search for images on a specific site.
     */
    
    google.load('search', '1');
    
    function onLoad() {
      // Create a search control.
      var searchControl = new google.search.SearchControl();
    
      // Create an ImageSearch.
      var imageSearch = new google.search.ImageSearch();
    
      // Set a site restriction to the desired web site.
      imageSearch.setSiteRestriction('nasa.gov');
    
      // Add the searcher to the SearchControl.
      searchControl.addSearcher(imageSearch);
    
      // Tell the searcher to draw itself and tell it where to attach.
      searchControl.draw(document.getElementById('content'));
    
      // Search!
      searchControl.execute('supernova');
    }
    
    google.setOnLoadCallback(onLoad);
     

Share This Page