<?php
$img
= imagecreatefromjpeg(
$filename
);
$logo
= imagecreatefromjpeg(
$filename
);
imagecopy(
$img
,
$logo
,15,15,0,0,
$width
,
$height
);
$url
=
'http://www.stchat.cn/data/attachment/forum/201506/12/100759pidbdaydh8dy7iby.jpg'
;
$content
=
file_get_contents
(
$url
);
$filename
=
'tmp.jpg'
;
file_put_contents
(
$filename
,
$content
);
$url
=
''
;
file_put_contents
(
'logo.png'
,
file_get_contents
(
$url
));
$img
= imagecreatefromjpeg(
$filename
);
$logo
= imagecreatefrompng(
'logo.png'
);
$size
=
getimagesize
(
'logo.png'
);
imagecopy(
$img
,
$logo
,15,15,0,0,
$size
[0],
$size
[1]);
header(
"centent-type:image/jpeg"
);
imagejpeg(img);
?>