PHP code example of sobhanlori / steganography

1. Go to this page and download the library: Download sobhanlori/steganography 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/ */

    

sobhanlori / steganography example snippets




use Sobhanlori\Steganography\Steganography;

$steganography = new Steganography();

$steganography
    ->conceal('example.png', 'This is hidden text!')
    ->save('example-secret.png');



use Sobhanlori\Steganography\Steganography;

$steganography = new Steganography();

$steganography
    ->conceal('example.png', 'This is hidden text!')
    ->download('example-secret.png');



use Sobhanlori\Steganography\Steganography;

$steganography = new Steganography();

$data = $steganography->reveal('example-secret.png');

echo $data;

$steganography
    ->conceal('image.png', 'Secret Message')
    ->save('output.png');



obhanlori\Steganography\Steganography;

$steganography = new Steganography();

// Hide data
$steganography
    ->conceal('photo.png', 'My Secret Message')
    ->save('photo-secret.png');

// Reveal data
$message = $steganography->reveal('photo-secret.png');

echo $message; // My Secret Message