How do I pull elements from another page?

0

I'm working on a script that needs to remove elements from a web page and add some text information to mine. I need to get my script from the IMDB description of an anime, how can I do that?

Example: through a link like this http://www.imdb.com/title/tt0433740/?ref_=nv_sr_1 , I would be able to add in my html things like the main image, the description and the note.

    
asked by anonymous 28.03.2017 / 12:41

1 answer

0

Imdb has a API and you can get information from any title by it
API: link

Javascript function to get the information you can do this with PHP tbm

function GetImdb(titulo) {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
       var resutado = JSON.parse(this.responseText);
       alert(resutado.Poster);
    }
  };
  xhttp.open("GET", "http://www.omdbapi.com/?t=" + titulo, true);
  xhttp.send();
}

GetImdb("Justice+League");
    
28.03.2017 / 16:12