Grab Screenshots from websites / App I wrote

Published 3 years ago by _stefanzweifel

Hi folks

I don't know if this forum is the right place, but I would like to share a Laravel application I recently built.

Screeenly helps you create screenshots from websites, so you can use them in your own application. Thanks to Jeffrey I learned a ton about PHP and OOP and I used Screeenly as a learning project to apply some of the techniques and patterns. It's for sure not THE best code of mine, but when Laravel 5 will be released, I will probably rebuilt the application, so I can use all the new awesome L5 stuff. I open sourced it because I didn't find nearly no Laravel application on Github and I wanted to share, how I structure my code. Maybe this is a inspiration to others ;)

There is also a composer package which works great with Laravel 4, so you don't have to struggle with the API itself. Maybe this is something for you.

Feedback is always appreciated :)

Have a nice sunday :) Stefan

bashy
bashy
3 years ago (996,850 XP)

Cool, good job!

I normally use Droplr to take fullsize sreenshots of pages, not sure what advantage this would be?

Example: http://d.pr/i/DYZ3/5uiRmlJj

theUnforgiven

Cool idea might use this to grab screenies for my new site.

_stefanzweifel

@bashy Didn't know Droplr can do that. Will test it out.

bashy
bashy
3 years ago (996,850 XP)

@_stefanzweifel Yeah it's only on the OS X version, I use it on both (Win/Mac)

graham
graham
3 years ago (39,395 XP)

@bashy where's the API for Droplr to grab screenshots of a given URL?

@_stefanzweifel nice work and thanks for sharing it. I can definitely see a use for this in my current project :-)

bashy
bashy
3 years ago (996,850 XP)

@Graham Not sure on that, sorry. You'll have to contact them or find it out :)

graham
graham
3 years ago (39,395 XP)

@bashy from your original comment I thought you were suggesting Screeenly and Droply were similar.

bashy
bashy
3 years ago (996,850 XP)

@Graham Well Droplr's main purpose isn't taking screenshots of pages if that's what you mean. Without logging into Screeeeeeenly I'm not exactly sure if it's the same but was asking if Droplr's method was similar and what advantage it was.

_stefanzweifel

@bashy @Graham I think when Droplr changed their plans the last time, they also killed the API.

Screeenly and Droplr can not be compared together. Droplr is a client-software and lives in your menubar. Screeenly on the other side is just a API endpoint you can call in your own applications. If you use the screeenly-client Package you can do something like this:

$screenshot = Screenshot::capture('https://laracasts.com');
$path = $screenshot->store('path/where/you/store/images');

This can be handy if you have a dashboard of pages you created (like a portfolio or a company internal application). Maybe the punchline on the landingpage is a bit unclear. Will probably change that to something more descriptive.

MThomas

@_stefanzweifel very interesting app!

Just one recommendation, try to add a couple of example screenshots on the website or create a demo page where the user can add an url and viewport to generate an screenshot. This will give a clrearer understanding on what screeenly is :)

graham
graham
3 years ago (39,395 XP)

thanks @_stefanzweifel that's what I thought. I'll be using screeenly to add website thumbnails to a control panel.

_stefanzweifel

@MThomas On my bucket list! Will add this in the upcoming days.

bashy
bashy
3 years ago (996,850 XP)

Yeah, I know they aren't the same, Droplr is a client based program. I was just trying to work out what would be the advantage over it.

With yours can you do logged in screenshots etc?

_stefanzweifel

@bashy In current version: no. The screenshot is created through PhantomJS. So Screeenly doesn't have your login cookies. But this could be a feature in the distant future... But honestly, I don't have any idea how you could accomplish the login flow in PhantomJS.

graham
graham
3 years ago (39,395 XP)

@bashy you can script taking screenshots of remote URL's.

Do you have a use case where you would need to log into a remote website to take a screenshot or are you just curious?

Please sign in or create an account to participate in this conversation.