I am attempting to pass 3 variables through the URL that are then placed on an image. They are labeled lone, ltwo, lthree there are lines 1,2, and 3 that will be displayed on the image.
I am able to get line 1 to display without any issues however everything i try to get the other two variables working does not work and results in an image being displayed that is contorted and rather messed up. Here is the code i have generated.
Question
Geoffrey B. Veteran
I am attempting to pass 3 variables through the URL that are then placed on an image. They are labeled lone, ltwo, lthree there are lines 1,2, and 3 that will be displayed on the image.
I am able to get line 1 to display without any issues however everything i try to get the other two variables working does not work and results in an image being displayed that is contorted and rather messed up. Here is the code i have generated.
<?php $lone = $_GET['lone']; $ltwo = $_GET['ltwo']; $lthree = $_GET['lthree']; $font = 'font.ttf'; if (!$size) $size = 13; $im = ImageCreateFromPNG('ball.png'); // calculate position of text $tsize = ImageTTFBBox($size, 0, $font, $text); $x = 255; $y = 100; // draw text $black = ImageColorAllocate($im,0,0,0); ImageTTFText($im, $size, 0, $x, $y, $black, $font, $lone); header('Content-Type: image/png'); ImagePNG($im); ?>This is the information I am passing through the URL
Link to comment
Share on other sites
3 answers to this question
Recommended Posts