Please read the following to understand how to use the 4EVERLAND Bucket with AWS SDK - PHP. This guide outlines the integration of AWS SDK API for PHP with the 4EVERLAND Bucket to facilitate file uploads to the IPFS or Arweave storage networks.
Preparation
PHP in your development environment.
the AWS SDK for PHP version 3.
a free 4EVERLAND account.
If you need to use Arweave storage, you need to create an Arweave bucket. Click to.
To obtain the corresponding API key in the bucket, click to.
SET 4EVERLAND_ACCESS_KEY_ID=[4everland-Access-Key]
SET 4EVERLAND_SECRET_ACCESS_KEY=[4everland-Secret-Key]
Configure the parameters within the environment variables
use Aws\Credentials\CredentialProvider;
use Aws\S3\S3Client;
// Use the default credential provider
$provider = CredentialProvider::defaultProvider();
// Pass the provider to the client
$client = new S3Client([
'endpoint' => 'https://endpoint.4everland.co',
'region' => '4everland',
'version' => 'latest',
'credentials' => $provider
]);
Create a bucket
Region: Fill in the default value as "4everland"
Bucket: Specify the desired name for the Bucket during creation