Exemplo n.º 1
0
            $t3->setMaskWord($item);
            $t3->createImg(100);
        }
        // 第四个水印日起
        $da = "2012-" . rand(2, 12) . "-" . rand(1, 28) . "";
        $b = imagettfbbox(14, 0, "upload/fangzheng.ttf", $da);
        //文字宽度
        $w = abs($b[2] - $b[0]);
        $t4 = new ThumbHandler();
        $t4->setSrcImg(dirname(__FILE__) . '/' . 'out.jpg');
        $t4->setMaskFont("upload/fangzheng.ttf");
        $t4->setMaskFontSize(46);
        $t4->setMaskFontColor("#13dd51");
        $t4->setMaskTxtPct(20);
        $t4->setDstImg(dirname(__FILE__) . '/' . 'out.jpg');
        $t4->setMaskOffsetX(($t4->src_w - $w - 170) / 2);
        $t4->setMaskOffsetY($t4->src_h - 280);
        $t4->setMaskWord($da);
        $t4->createImg(100);
    }
}
//发送图片微博
if (file_exists('out.jpg')) {
    if (isset($_SESSION[OpenSDK_Tencent_Weibo::ACCESS_TOKEN]) && isset($_SESSION[OpenSDK_Tencent_Weibo::OAUTH_TOKEN_SECRET])) {
        $result = OpenSDK_Tencent_Weibo::call('t/add_pic', array('content' => $message, 'clientip' => '123.119.32.253'), 'POST', array('pic' => array('type' => 'image/jpg', 'name' => '0.jpg', 'data' => file_get_contents('out.jpg'))));
        // 如果不要加关注作者,把下面语句注译去掉
        if ($_POST['gz']) {
            $friendadd = OpenSDK_Tencent_Weibo::call('friends/add', array('name' => CREATER), 'post');
        }
        if ($result) {
            header("Location: last.php");
Exemplo n.º 2
0
	$t3->setDstImg(dirname(__FILE__).'/'.'out.jpg');	
	$t3->setMaskOffsetX(83);
	$t3->setMaskOffsetY(111);
	$t3->setMaskWord($con3);
	$t3->createImg(100);
	
	// 第四个水印
	// $uinfo = OpenSDK_Tencent_Weibo::call('user/info');
	$t4 = new ThumbHandler();
	$t4->setSrcImg(dirname(__FILE__).'/'.'out.jpg');
	$t4->setMaskFont("upload/simkai.ttf");
	$t4->setMaskFontSize(14);
	$t4->setMaskFontColor("#FF0000");
	$t4->setMaskTxtPct(20);
	$t4->setDstImg(dirname(__FILE__).'/'.'out.jpg');	
	$t4->setMaskOffsetX(150-$w/2);
	$t4->setMaskOffsetY(308);
	$t4->setMaskWord($userinfo);
	$t4->createImg(100);

	
}
//发送图片微博
if(file_exists('out.jpg')){
	if(isset($_SESSION[OpenSDK_Tencent_Weibo::ACCESS_TOKEN]) && isset($_SESSION[OpenSDK_Tencent_Weibo::OAUTH_TOKEN_SECRET])){
	
		$result = OpenSDK_Tencent_Weibo::call('t/add_pic', array(
				'content' => "{$con}",//这里读取内容
				'clientip' => '123.119.32.253',
			), 'POST', array(
			'pic' => array(
Exemplo n.º 3
0
    $t2->setMaskFont("upload/simkai.ttf");
    $t2->setMaskFontSize(14);
    $t2->setMaskFontColor("#000000");
    $t2->setMaskTxtPct(20);
    // $t2->setDstImgBorder(10,"#dddddd");
    $t2->setDstImg(dirname(__FILE__) . '/' . 'out.jpg');
    $t2->setMaskOffsetX(62);
    $t2->setMaskOffsetY(210);
    $t2->setMaskWord("{$nowAge}   {$thisMonth}");
    $t2->createImg(100);
    // 死亡时分秒
    $t3 = new ThumbHandler();
    $t3->setSrcImg(dirname(__FILE__) . '/' . 'out.jpg');
    $t3->setMaskFont("upload/simkai.ttf");
    $t3->setMaskFontSize(14);
    $t3->setMaskFontColor("#000000");
    $t3->setMaskTxtPct(20);
    // $t2->setDstImgBorder(10,"#dddddd");
    $t3->setDstImg(dirname(__FILE__) . '/' . 'out.jpg');
    $t3->setMaskOffsetX(98);
    $t3->setMaskOffsetY(180);
    $t3->setMaskWord("{$thisDay}   24  {$thisMoment}   {$thisSecond}");
    $t3->createImg(100);
}
//发送图片微博
if (file_exists('out.jpg')) {
    if (isset($_SESSION[OpenSDK_Tencent_Weibo::ACCESS_TOKEN]) && isset($_SESSION[OpenSDK_Tencent_Weibo::OAUTH_TOKEN_SECRET])) {
        $result = OpenSDK_Tencent_Weibo::call('t/add_pic', array('content' => "{$con}", 'clientip' => '123.119.32.253'), 'POST', array('pic' => array('type' => 'image/jpg', 'name' => '0.jpg', 'data' => file_get_contents('out.jpg'))));
        print_r($result);
    }
}