PHP code example of fraserreed / meme-puush
1. Go to this page and download the library: Download fraserreed/meme-puush 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/ */
fraserreed / meme-puush example snippets
$image->setTopCaption( "top caption text" );
$image->setBottomCaption( "bottom caption text" );
$outputContent = $image->output();
switch( $output )
{
case 'screen':
header( 'Content-type: image/jpg' );
echo file_get_contents( $outputContent );
break;
case 'file':
echo $outputContent;
break;
case 'puush':
echo json_encode( array( 'url' => $outputContent ) );
break;
}