You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP library to get info and embed any web page (using oembed, opengraph, twitter-cards, scrapping the html, etc). It's compatible with any web service (youtube, vimeo, flickr, instagram, etc).
8
-
Has adapters to some webpages like (archive.org, github, deviantart, etc).
7
+
PHP library to get information about any web page (using oembed, opengraph, twitter-cards, scrapping 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).
$info->images; //List of all images found in the page
32
31
$info->image; //The image choosen as main image
33
32
$info->imageWidth; //The with of the main image
34
-
$info->imageHeight; //The height of the main image
33
+
$info->imageHeight; //The height of the main image
35
34
36
35
$info->code; //The code to embed the image, video, etc
37
36
$info->width; //The with of the embed code
@@ -59,6 +58,7 @@ Available options
59
58
* embedlyKey (string): If it's defined, get info from embedly service (only for know supported services and if the page doesn't have its own oembed service)
60
59
* oembedParameters (array): Extra GET parameters to the oembed requests.
61
60
* facebookProvider (bool): If it's true, the facebook provider will be used to get the page information, that uses the facebook scrapping. By default is false because reduce the number of requests and facebook scrapping not always returns right results.
61
+
* request (array): Used to customize the request (see below)
Embed provides a RequestResolvers\Curl class to resolve all requests using the curl library. You can set custom options to the curl request or use your own request resolver class creating a class implementing the RequestResolverInterface. To do that, you have the "resolver" that is an array with two values: "class" (if you want provide your own class) and "options" to set options to the curl library. The options can be any of the available in the [curl_setopt PHP function](http://php.net/manual/en/function.curl-setopt.php)
74
+
Embed uses the `Embed\RequestResolvers\Curl` class to resolve all requests using the curl library. You can set options to the curl request or create your own implementation creating a class implementing the `Embed\RequestResolvers\RequestResolverInterface`.
75
+
76
+
The resolver configuration is defined under the "resolver" key in the options array. There is two options:
77
+
78
+
* class: Your custom class name if you want to use your own implementation
79
+
* options: The options passed to the class. If you use the default curl class, the options are the same than the [curl_setopt PHP function](http://php.net/manual/en/function.curl-setopt.php)
75
80
76
81
```php
82
+
//Customize the curl request of the default Embed\RequestResolvers\Curl
0 commit comments