PHP code example of ethercap / watermark

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

    

ethercap / watermark example snippets


\ethercap\watermark\WaterMark::widget([]);

\ethercap\watermark\WaterMark::widget([
    'id' => 'xxx',             //水印总体的id
    'txt' => "测试水印",        //水印的内容
    'x' => 20,                 //水印起始位置x轴坐标
    'y' => 20,                 //水印起始位置Y轴坐标
    'rows' => 0,               //水印行数
    'cols' => 0,               //水印列数
    'xSpace' => 100,           //水印x轴间隔
    'ySpace' => 50,            //水印y轴间隔
    'font' => '微软雅黑',       //水印字体
    'color' => 'black',        //水印字体颜色
    'fontSize' => '18px',      //水印字体大小
    'alpha' => 0.15,           //水印透明度,要求设置在大于等于0.003
    'width' => 150,            //水印宽度
    'height' => 100,           //水印长度
    'angle' => 15,             //水印倾斜度数
]);