Waarom doet dit code dit?
http://raputatie.one2xs.com/test.php?path=http://www.qotile.net/images/lol.jpg
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// this script creates a watermarked image from an image file - can be a .jpg .gif or .png file
// where watermark.gif is a mostly transparent gif image with the watermark - goes in the same directory as this script
// where this script is named watermark.php
// call this script with an image tag
// <img src="watermark.php?path=imagepath"> where path is a relative path such as subdirectory/image.jpg [/COLOR]
[COLOR= #0000BB]$imagesource[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]path[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$filetype[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$imagesource[/COLOR][COLOR= #007700],[/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$imagesource[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]4[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]4[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$filetype[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$filetype[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$filetype[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]".gif"[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #0000BB]$image[/COLOR] [COLOR= #007700]= @[/COLOR]imagecreatefromgif[COLOR= #007700]([/COLOR][COLOR= #0000BB]$imagesource[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$filetype[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]".jpg"[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #0000BB]$image[/COLOR] [COLOR= #007700]= @[/COLOR]imagecreatefromjpeg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$imagesource[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$filetype[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]".png"[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #0000BB]$image[/COLOR] [COLOR= #007700]= @[/COLOR]imagecreatefrompng[COLOR= #007700]([/COLOR][COLOR= #0000BB]$imagesource[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$image[/COLOR][COLOR= #007700])[/COLOR] [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$watermark[/COLOR] [COLOR= #007700]= @[/COLOR]imagecreatefromgif[COLOR= #007700]([/COLOR][COLOR= #DD0000]images/watermark.gif[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$imagewidth[/COLOR] [COLOR= #007700]=[/COLOR] imagesx[COLOR= #007700]([/COLOR][COLOR= #0000BB]$image[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$imageheight[/COLOR] [COLOR= #007700]=[/COLOR] imagesy[COLOR= #007700]([/COLOR][COLOR= #0000BB]$image[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$watermarkwidth[/COLOR] [COLOR= #007700]=[/COLOR] imagesx[COLOR= #007700]([/COLOR][COLOR= #0000BB]$watermark[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$watermarkheight[/COLOR] [COLOR= #007700]=[/COLOR] imagesy[COLOR= #007700]([/COLOR][COLOR= #0000BB]$watermark[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$startwidth[/COLOR] [COLOR= #007700]= ([/COLOR][COLOR= #0000BB]$imagewidth[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$watermarkwidth[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$startheight[/COLOR] [COLOR= #007700]= ([/COLOR][COLOR= #0000BB]$imageheight[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$watermarkheight[/COLOR][COLOR= #007700]);[/COLOR]
imagecopy[COLOR= #007700]([/COLOR][COLOR= #0000BB]$image[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$watermark[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$startwidth[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$startheight[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$watermarkwidth[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$watermarkheight[/COLOR][COLOR= #007700]);[/COLOR]
imagejpeg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$image[/COLOR][COLOR= #007700]);[/COLOR]
imagedestroy[COLOR= #007700]([/COLOR][COLOR= #0000BB]$image[/COLOR][COLOR= #007700]);[/COLOR]
imagedestroy[COLOR= #007700]([/COLOR][COLOR= #0000BB]$watermark[/COLOR][COLOR= #007700]);[/COLOR]
?> http://raputatie.one2xs.com/test.php?path=http://www.qotile.net/images/lol.jpg


