Search code examples
embed

How get rich content from an url (like Discord)?


How can I get some page informations like title, description, thumbnail, etc. from an url like Discord?

I want do it in php or javascript.

Is it a protocol, an api or anything else?

Examples:

enter image description here

enter image description here

enter image description here


Solution

  • For PHP, use https://github.com/oscarotero/Embed

    PHP library to get information from any web page (using oembed, opengraph, twitter-cards, scraping the html, etc). It's compatible with any web service (youtube, vimeo, flickr, instagram, etc) and has adapters to some sites like (archive.org, github, facebook, etc).