PHP code example of schoolbridge / sbcdn

1. Go to this page and download the library: Download schoolbridge/sbcdn library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

schoolbridge / sbcdn example snippets


 
	
	hoolBridge\sbcdn\SBCDN as SBCDN;

	define('SB_CDN_AUTH_USERNAME', 'your username from Inbox Design');
	define('SB_CDN_AUTH_PASSWORD', 'your secret app toekn here');

	$file = 'path/to/my/image.jpg';


	$sbcdn = new SBCDN();
	
	$upload = $sbcdn
			->add($file)
			->destination('tidewater/requests/') // school 'permalink' then folder path
			->name('file_'. time() .'.jpg') // optional
			->upload();