Web service to generate images of websites. Written with Silex framework. Uses wkhtmltopdf.
docker run -d -p 8080:80 -v /tmp/siteshot_cache:/var/www/shot/cache agentsib/siteshot:latest
Now try localhost:8080
http://localhost:8080/{mode}/{sizes}/{fwidth}/{format}/t{timeout}?{url}
- mode -
corner
orresize
- sizes - screenshot size (for example 400 or 400x500)
- fwidth - for
corner
- crop upper left corner box width and height, forresize
- max width - format -
png
orjpg
- timeout - wait time after load page content (by default: 1). Usable for sites with flash. Example: t1 or t10
- url - url for capture
Returns http status 404 if creating screenshot failed.
http://siteshot.dev/resize/800x600/400/png?http://google.com
http://siteshot.dev/resize/800x600/400/png/t5?http://speedtest.net
http://siteshot.dev/corner/800x600/400/png?http://vk.com
Show symfony errors:
docker run -ti -p 8080:80 -e DEBUG=1 -v /path/to/siteshot-php:/var/www/shot agentsib/siteshot:latest