The PHP by API to get the thumbnail of the specified page.
August 2019, free.pagepeeker.com cannot obtain thumbnail images via SSL.
The API, If OGP is not specified, a page thumbnail is generated with PagePeeker, processed to the specified size, converted to base64 and output.
Thumbnail acquisition part in Paste Title (HTML or Markdown).
This program has been tested with PHP7.
get_thumbnail.php?size=[size]&base64=[base64]&dont_use_ogp=[dont_use_ogp]&url=[url]
No | Item | Type | Must | Comment | Example |
---|---|---|---|---|---|
1 | size | string | yes | Thumbnail size. Select t,s,m,l,x. See PagePeeker API document. |
t |
2 | base64 | boolean | yes | Is the return value acquired in base64? | true |
3 | dont_use_ogp | boolean | no | Force PagePeeker to generate thumbnails without using OGP. | false(default) |
4 | url | string | yes | Thumbnail acquisition source. | http://bit.ly/2ZVDTyD |
Put common.php and thumbnail.php in the same folder.
Use postman, and import "test/GitHub.postman_collection.json".
- Fork it ( http://github.com/hiroshikuze/get-thumbnail-from-pagepeeker/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request