Thanks for posting a general inquiry, ROBOT. Please, go die in a fire!
Hmmm... Thanks for trying out the URL at
Here's what I found:
'http://codepen.io/api/oembed', 'dribbble.com' => 'https://api.embed.ly/v1/api/oembed', 'flickr.com' => 'https://www.flickr.com/services/oembed/', //Facebook also allows video oembed - https://developers.facebook.com/docs/plugins/oembed-endpoints //note: Facebook posts or videos must be public 'facebook.com' => 'https://graph.facebook.com/v8.0/oembed_post', 'giphy.com' => 'https://giphy.com/services/oembed', //note: getty needs short url pattern + asset id -> http://gty.im/[asset-id] 'gty.im' => 'http://embed.gettyimages.com/oembed', //'github.com' => 'https://github.com/api/oembed', //'hulu.com' => 'http://www.hulu.com/api/oembed.json', 'ifttt.com' => 'https://ifttt.com/oembed', 'instagram.com' => 'https://graph.facebook.com/v8.0/instagram_oembed', 'kickstarter.com' => 'https://www.kickstarter.com/services/oembed', 'meetup.com' => 'https://api.meetup.com/oembed', 'nytimes.com' => 'https://www.nytimes.com/svc/oembed/json/', 'reddit.com' => 'https://www.reddit.com/oembed', 'slideshare.net' => 'http://www.slideshare.net/api/oembed/2', 'soundcloud.com' => 'https://soundcloud.com/oembed', 'speakerdeck.com' => 'https://speakerdeck.com/oembed.json', //'spotify.com' => 'https://embed.spotify.com/oembed/', 'ted.com' => 'https://www.ted.com/talks/oembed.json', 'tiktok.com' => 'https://www.tiktok.com/oembed', 'twitter.com' => 'https://publish.twitter.com/oembed', 'ustream.tv' => 'http://www.ustream.tv/oembed', 'vine.co' => 'https://vine.co/oembed.json', 'vimeo.com' => 'https://vimeo.com/api/oembed.json', 'wordpress.com' => 'http://public-api.wordpress.com/oembed/', 'youtube.com' => 'https://www.youtube.com/oembed' ); $service = false; foreach($sources as $domain => $source) { if (stristr($url, $domain)) { $service = $source; } } if (!$service) { $message = 'Could not find an Oembed service endpoint. Note that Facebook requires posts or videos to be public.'; return $message; } $options = array( CURLOPT_URL => $service.'?url='.urlencode($url).'&format=json&maxwidth='.$maxwidth, CURLOPT_USERAGENT => 'jasonclark.info', CURLOPT_TIMEOUT => 5, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HEADER => FALSE ); $curl = curl_init(); curl_setopt_array($curl, $options); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if (isset($response['type'])) { switch ($response['type']) { case 'photo': $img = ''.$img.'
embed source code:
'.htmlspecialchars($img).''; break; default: $embedResult = $response['title'].'
'.$response['html'].'
embed source code:
'.htmlspecialchars($response['html']).''; break; } } if (empty($response['type'])) { $message = 'Oembed result not available for this service. Note that Facebook requires posts or videos to be public.'; return $message; } else { return $embedResult; } } echo getEmbedCode($uri); ?>