PHP Classes

Archive.org PHP API: Get past versions of pages from Wayback Machine

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 136 This week: 2All time: 9,258 This week: 94Up
Version License PHP version Categories
wbm-scrapper 1.0.0MIT/X Consortium ...5PHP 5, Web services
Description 

Author

This package can get past versions of pages from Wayback Machine.

It can send HTTP requests to the archive.org Web site to retrieve snapshots of past versions of a page with a given URL.

Can also retrieve the list of available snapshots of a given page of a given year, as well the list of years that a page has available snapshots.

Innovation Award
PHP Programming Innovation award nominee
December 2018
Number 2
Many sites have gone through many changes and nowadays they look different or even do not exist.

The Wayback Machine is site that keeps archives of old versions of Web site pages even after they do not exist anymore.

This package provides a means to retrieve old version of Web site pages from PHP.

Manuel Lemos
Picture of Dawood Ikhlaq
  Performance   Level  
Name: Dawood Ikhlaq <contact>
Classes: 8 packages by
Country: Italy Italy
Age: 29
All time rank: 194776 in Italy Italy
Week rank: 109 Up4 in Italy Italy Up
Innovation award
Innovation award
Nominee: 4x

Example

<?php
/**
 * Created by PhpStorm.
 * User: daudm
 * Date: 2/25/2018
 * Time: 8:27 PM
 */

use dawood\WBMScrapper\WBMScrapper;
include
"../vendor/autoload.php";

$url = 'https://github.com/';
$aliExpressFirstSnapShotYear = WBMScrapper::firstSnapshotYear($url);
$aliExpressLastSnapShotYear = WBMScrapper::lastSnapshotYear($url);
echo
$aliExpressFirstSnapShotYear.PHP_EOL;
echo
$aliExpressLastSnapShotYear.PHP_EOL;

$snapshotsOf2012 = WBMScrapper::getSnapShotUrlsOfYear($url, 2012);
print_r($snapshotsOf2012 );

$allSnapshots = WBMScrapper::getAllSnapShotUrls($url);
print_r($allSnapshots);


Details

WMB Scrapper

=========================================

Latest Stable Version Total Downloads License

Introduction

A small Php package to fetch archive url snapshots from archive.org. using it you can fetch complete list of snapshot urls of any year or complete list of all years possible. This package can be used to do recon of any target.

Installation

Install the package through composer:

composer require dawood/wmb-scrapper

Make sure, that you include the composer autoloader somewhere in your codebase.

Examples

There are several examples provided in examples folder too.

Get first/last snapshot year of domain

include "vendor/autoload.php";
use dawood\WBMScrapper\WBMScrapper;

$url = 'https://github.com/';
$firstSnapShotYear = WBMScrapper::firstSnapshotYear($url);
$lastSnapShotYear = WBMScrapper::lastSnapshotYear($url);
echo $lastSnapShotYear .PHP_EOL;
echo $firstSnapShotYear.PHP_EOL;


Get snapshots of any year of domain

include "vendor/autoload.php";
use dawood\WBMScrapper\WBMScrapper;

$url = 'https://github.com/';
$snapshotsOf2012 = WBMScrapper::getSnapShotUrlsOfYear($url, 2012);
print_r(snapshotsOf2012 );
//outputs list of urls of waybackmachin snapshots
e.g
https://web.archive.org/web/20091226225818/http://www.github.com/
    

Get snapshots of all years of domain

include "vendor/autoload.php";
use dawood\WBMScrapper\WBMScrapper;

$url = 'https://github.com/';
$allSnapshots = WBMScrapper::getAllSnapShotUrls($url);
print_r($allSnapshots);

//outputs a complete list of urls of waybackmachin snapshots
e.g
https://web.archive.org/web/20091226225818/http://www.github.com/


License

The WMB Scrapper is open-sourced software licensed under the MIT license.

Contribution

Thanks to all of the contributors ,

Author

Dawood Ikhlaq and Open source community



  Files folder image Files  
File Role Description
Files folder imageexamples (1 file)
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file index.php Aux. Auxiliary script
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file example.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file WBMScrapper.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:136
This week:2
All time:9,258
This week:94Up