PHPackages                             coderdojo/delorean - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. coderdojo/delorean

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

coderdojo/delorean
==================

PHP Console app that downloads screenshots from the Internet Archive Wayback Machine

1.0(10y ago)331MITPHP

Since Oct 22Pushed 10y ago8 watchersCompare

[ Source](https://github.com/CoderDojoScotland/delorean)[ Packagist](https://packagist.org/packages/coderdojo/delorean)[ RSS](/packages/coderdojo-delorean/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Coderdojo Delorean Time Machine
===============================

[](#coderdojo-delorean-time-machine)

This PHP command line (console) app allows you to generate screenshots of websites from the past and present, courtesy of [Wayback Machine](http://archive.org/web/) by The Internet Archive.

Installation
------------

[](#installation)

Install this application through [Composer](getcomposer.org).

If you don't have Composer installed yet, run

```
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

```

Once you have Composer, you can install the app an it's depencies with

```
composer create-project coderdojo/delorean

```

Alternatively, if you prefer to clone this Git repository, you can install the dependencies only with the following (inside the app root).

```
composer install

```

### Requirements

[](#requirements)

This package is designed to work with PHP &gt;= 5.6 over the command line.

Usage
-----

[](#usage)

### Generate Screenshots

[](#generate-screenshots)

You can generate a past and present screenshot of a specific website by using the command: `php delorean screenshot  [--years=10]`

In other words,

```
php delorean screenshot http://google.com

```

will generate a screenshot for the present day, plus one from the past using the default number of years (which is 10).

To change the number of years ago for the past screenshot, you can pass this as an option.

```
php delorean screenshot http://google.com --years=5

```

How it Works
------------

[](#how-it-works)

The `delorean` file in the project root is a command line php script that registers a new [Symfony](http://symfony.com/) console application, currently with one command.

The `src/ScreenshotCommand.php` file contains the code that is run when you put `php delorean screenshot http://google.com` in the command line. Have a look in this file to check the process of getting the URL and number of years. The `getSnapshotUrl()` method in this file connects to the [Wayback Machine API](https://archive.org/help/wayback_api.php) to find the right URL for the past copy of the website.

The `src/ScreenshotGenerator.php` file contains the code that takes a screenshot. Because this is contained within it's own PHP class / file, we can re-use this in future by just including it from wherever it's needed. See [Wikipedia - DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).

Finally, this ap makes use of a number of Open-source projects. These are listed below:

- [**Symfony Console**](http://symfony.com/doc/current/components/console) - Used to register a command-line app and get input from the user.
- [**Symfony Process**](http://symfony.com/doc/current/components/process.html) - Component used to run other command line processes from our code.
- [**PhantomJs**](http://phantomjs.org/screen-capture.html) - A 'headless' browser that we use to load up webpages and take screenshots in our code.
- [**Guzzle**](http://guzzlephp.org/) - A great HTTP client used to 'talk' to the Wayback Machine API.
- [**Carbon**](http://carbon.nesbot.com/) - A simple PHP DateTime helper that makes working with timestamps super easy.

TODO
----

[](#todo)

- \[\] Update to check if URL exists before taking past/present screenshots
- \[\] Add command option to only generate past screenshot (rather than present and past)
- \[\] New command to take multiple past screenshots at the one time

Why Delorean?
-------------

[](#why-delorean)

In the feature film series *Back to the Future*, Dr. Emmett Brown builds a time machine based on an automobile; a [*DeLorean*](https://en.wikipedia.org/wiki/DeLorean_time_machine) DMC-12.

Futher Reading.
---------------

[](#futher-reading)

- Open-source packages listed above
- [How to Build Command-Line Apps](https://laracasts.com/series/how-to-build-command-line-apps-in-php) video series on Laracasts.com

Credits / License
-----------------

[](#credits--license)

Made by David Rushton, Developer at [Papertank Limited](http://papertank.co.uk)[Using the MIT License](http://github.com/CoderDojoScotland/delorean/blob/master/LICENSE.txt)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3861d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b1eb2c68ae9c43fc61ae8aa21aabaf932fcb1fd2372e77db8e7800d38cdf3d2?d=identicon)[papertank](/maintainers/papertank)

---

Top Contributors

[![davidrushton](https://avatars.githubusercontent.com/u/4039772?v=4)](https://github.com/davidrushton "davidrushton (6 commits)")

### Embed Badge

![Health badge](/badges/coderdojo-delorean/health.svg)

```
[![Health](https://phpackages.com/badges/coderdojo-delorean/health.svg)](https://phpackages.com/packages/coderdojo-delorean)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[overtrue/php-opencc

中文简繁转换，支持词汇级别的转换、异体字转换和地区习惯用词转换（中国大陆、台湾、香港、日本新字体）。基于 \[BYVoid/OpenCC\](https://github.com/BYVoid/OpenCC) 数据实现。

12130.7k](/packages/overtrue-php-opencc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
