Download the PHP package inwebo/save-page-now-2 without Composer

On this page you can find all versions of the php package inwebo/save-page-now-2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package save-page-now-2

save-page-now-2

PHP 8.1+ client library for the Save Page Now 2 (SPN2) API provided by the Internet Archive.

Official Documentation


Installation

Obtain your S3 API keys at https://archive.org/account/s3.php.


Quick Start


Architecture


Complete API

capture(string $url, ?CaptureOptions $options = null): CaptureJobResponse

Submits a URL for archiving. Returns a job_id immediately.

getStatus(string $jobId): StatusResponseInterface

Returns a PendingStatusResponse, SuccessStatusResponse, or ErrorStatusResponse.

getStatuses(array $jobIds): array<string, StatusResponseInterface>

Retrieves the status of multiple jobs in a single request.

getOutlinksStatus(string $parentJobId): array<string, StatusResponseInterface>

Retrieves the status of all outlinks for a parent job (requires capture_outlinks=1).

getUserStatus(): UserStatusResponse

Active and available sessions for the authenticated user.

getSystemStatus(): SystemStatusResponse

Overall health of the SPN2 service.


Capture Options

Builder method API Parameter Description
withCaptureAll() capture_all=1 Also captures 4xx/5xx pages
withCaptureOutlinks() capture_outlinks=1 Automatically archives outlinks
withCaptureScreenshot() capture_screenshot=1 Captures a full-page PNG screenshot
withDelayWbAvailability() delay_wb_availability=1 Available in \~12h (reduces server load)
withForceGet() force_get=1 Forces a simple GET (no headless browser)
withSkipFirstArchive() skip_first_archive=1 Skips the "first archive" check (faster)
withIfNotArchivedWithin(string) if_not_archived_within Only archives if older than e.g., "3d 5h"
withOutlinksAvailability() outlinks_availability=1 Returns the last snapshot timestamp for each outlink
withEmailResult() email_result=1 Sends an email report
withJsBehaviorTimeout(int $s) js_behavior_timeout=N JS execution time after loading (0–30s)
withCaptureCookie(string) capture_cookie Additional HTTP cookie for the target
withTargetCredentials(string, string) target_username/password Credentials for the target's auth forms

Error Handling

Detailed error codes from status_ext (e.g., error:not-found, error:too-many-daily-captures) are available via ErrorStatusResponse::getStatusExt().


Testing

Run tests using the included PHPUnit runner:


License

MIT


All versions of save-page-now-2 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/http-client Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package inwebo/save-page-now-2 contains the following files

Loading the files please wait ...