Download the PHP package byteark/byteark-sdk-php without Composer

On this page you can find all versions of the php package byteark/byteark-sdk-php. 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 byteark-sdk-php

ByteArk SDK for PHP

Packagist Version Build Status

Installation

You may install this SDK via Composer

composer require byteark/byteark-sdk-php

Using ByteArkV2UrlSigner class

First, create a ByteArkV2UrlSigner instance with access_id and access_secret. (access_id is currently optional for ByteArk Fleet).

Then, call sign method with URL to sign, Unix timestamp that the URL should expired, and sign options.

For sign options argument, you may include method, which determines which HTTP method is allowed (GET is the default is not determined), and may includes custom policies that appears in ByteArk Documentation.

The following example will create a signed URL that allows to GET the resource within 1st January 2018:

Usage for HLS

When signing URL for HLS, you have to choose common path prefix and assign to path_prefix option is required, since ByteArk will automatically create secured URLs for each segments using the same options and signature.

For example, if your stream URL is https://example.cdn.byteark.com/live/playlist.m3u8, you may use /live/ as a path prefix.

Options

ByteArkV2UrlSigner

Option Required Default Description
access_id Required - Access key ID for signing
acesss_secret Required - Access key secret for signing
default_age - 900 Default signed URL age (in seconds), if signing without expired date/time

ByteArkV2UrlSigner.sign(url, expires = null, options = [])

Option Required Default Description
method - GET HTTP Method that allowed to use with the signed URL
path_prefix - - Path prefix that allowed to use with the signed URL (the same signing options and signature can be reuse with the

Using RequestInfo class

(This is useful for legacy signing conditions, such as client_ip and user_agent).

After create a RequestInfo instance, you may use getCurrentUrl method to help you get current URL, and use get method to get values for some of these policies:

For example:

Example Projects

You may try the sample project that allows you to create signed URLs with simple web form.


All versions of byteark-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 byteark/byteark-sdk-php contains the following files

Loading the files please wait ....