Skip to content

Generate screenshots using the urlbox.io screenshot-as-a-service API using CFML.

License

Notifications You must be signed in to change notification settings

mjclemente/urlbox-screenshots-cfml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urlbox-screenshots

Quickly generate screenshots using the urlbox.io screenshot-as-a-service API.

This project follows the example of the official Urlbox node and php repositories and generates the Urlbox urls, but does not actually make the request for the screenshot.

Signup at Urlbox.io to get your API key and secret.

Installation

You can install this project with CommandBox:

box install urlbox-screenshots

Alternatively, you can copy the models/urlbox.cfc file into your project.

Example

// Get your API key and secret from urlbox.io
urlbox = new models.urlbox(YOUR_API_KEY, YOUR_API_SECRET);

// See all urlbox screenshot options at urlbox.io/docs
url = 'github.com';
options = {
  thumb_width: 600,
  format: 'jpg',
  quality: 80
}

imgUrl = urlbox.buildUrl( url, options );
// https://api.urlbox.io/v1/YOUR_API_KEY/TOKEN/jpg?url=github.com&quality=80&thumb_width=600

Now stick that url in an img tag to render the screenshot!

Urlbox Screenshot of github.com

Available options can be found here: urlbox.io/docs

About

Generate screenshots using the urlbox.io screenshot-as-a-service API using CFML.

Resources

License

Stars

Watchers

Forks

Packages

No packages published