PHP code example of rockschtar / wordpress-object-storage

1. Go to this page and download the library: Download rockschtar/wordpress-object-storage 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/ */

    

rockschtar / wordpress-object-storage example snippets


//without expiration time
rsos_set_object('my-key', 'my-value');

//with expiration time
rsos_set_object('my-key', 'my-value', 60 * 60 * 24);

$myKey = rsos_get_object('my-key');

$myKey = rsos_delete_object('my-key');