We're writing an application that renders text as an image.
1. Write a PHP application that displays a form, my_form.php, that asks for the following:
2. When the form is submitted, it posts the data to another file, image_text.php, which simply returns the text rendered as a png image.
For this code, you can start with our example source file . Alter it to read the form data that is posted to it.
Note: Use the color_allocate function from this example to look up the color names.
3. What would you do if you wanted it to also work when you pass parameters to it on the url?
Written this way, you could use the text_image.php from an <img> tag with the parameters hard coded.