voorbeeld.php

Gesponsorde koppelingen

PHP script bestanden

  1. oembed.php
  2. voorbeeld.php

« Lees de omschrijving en reacties

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php

include_once 'oembed.php';

// YouTube.
var_dump(oembed_get_data('http://www.youtube.com/watch?v=tPxgi-PiNFE&hd=1'));
/*
object(stdClass)#1 (13) {
  ["provider_url"]=>
  string(23) "http://www.youtube.com/"
  ["title"]=>
  string(51) "Gaspar NoĆ©'s Enter The Void - Opening Credits (HD)"
  ["html"]=>
  string(391) "<object width="480" height="295"><param name="movie" value="http://www.youtube.com/e/tPxgi-PiNFE"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/e/tPxgi-PiNFE" type="application/x-shockwave-flash" width="480" height="295" allowscriptaccess="always" allowfullscreen="true"></embed></object>"
  ["author_name"]=>
  string(20) "cinematicallyawkward"
  ["height"]=>
  int(295)
  ["thumbnail_width"]=>
  int(480)
  ["width"]=>
  int(480)
  ["version"]=>
  string(3) "1.0"
  ["author_url"]=>
  string(48) "http://www.youtube.com/user/cinematicallyawkward"
  ["provider_name"]=>
  string(7) "YouTube"
  ["thumbnail_url"]=>
  string(48) "http://i1.ytimg.com/vi/tPxgi-PiNFE/hqdefault.jpg"
  ["type"]=>
  string(5) "video"
  ["thumbnail_height"]=>
  int(360)
}
*/


// Flickr, volgens mij via embed.ly

var_dump(oembed_get_data('http://www.flickr.com/photos/skorj/3404545680/in/set-472500/'));
/*
object(stdClass)#1 (15) {
  ["provider_url"]=>
  string(22) "http://www.flickr.com/"
  ["description"]=>
  string(47) "magnesiumagency.com/2010/01/14/abandoned_japan/"
  ["title"]=>
  string(48) "The drunken karaoke could be heard in the winds."
  ["url"]=>
  string(61) "http://farm4.static.flickr.com/3469/3404545680_69d8788459.jpg"
  ["author_name"]=>
  string(5) "Skorj"
  ["height"]=>
  int(418)
  ["width"]=>
  int(500)
  ["thumbnail_url"]=>
  string(63) "http://farm4.static.flickr.com/3469/3404545680_69d8788459_s.jpg"
  ["thumbnail_width"]=>
  int(75)
  ["version"]=>
  string(3) "1.0"
  ["provider_name"]=>
  string(6) "Flickr"
  ["cache_age"]=>
  int(3600)
  ["type"]=>
  string(5) "photo"
  ["thumbnail_height"]=>
  int(75)
  ["author_url"]=>
  string(35) "http://www.flickr.com/photos/skorj/"
}
*/

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.