Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Im needing some help creating a php script
that will post text to a .jpg image throught a fourm I have an example of what Im needing to do just email me if you think you might be able to help Thanks Tim

[code]
<? php function disp_title()
{
echo "text";
}
?>
">
"text" is what you would label the image. Place "<?php disp_title(); ?> whenever it is needed.
[/code]

Oh my god!! not again!
here is it [img src = "someimg" alt = "[?php disp_title(); ?]"]
notice I have changed the < to [

I think what Tim asked is a dynamic image generation
first you have to make sure that your hosting supports GD library then you must also set them up to treat .jpg files as PHP scripts...
then you can do PHP commands on generating dynamic images...
http://www.phpbuilder.com/columns/rasmus19990124.php3

Right you are.. Laler
Im runing apache server form home I have php running a script that prevents auotmated dowloads on a diferent section but on the same machine it uses a jpg image. It puts a randem gererated number into a jpg.File witch a user must type into a box. So does anyone know how I can do this I dont have any Idea. I had some one else make the other script. I would Like to use some kind of form /php combo which ask for Name,RR name,state,country,Email,Then the php script must be able to put this info on the template image and post it to an html file like in the example i posted. I wount to make sure where on the same page..

I'm not a PHP expert, so I can't give a good tutorial...
but to "draw a variable horizontally" use: imagestring();
Download the latest php.chm file, it is quite handy (browsing to php.net when developing a script is not so efficient :)
and btw, I don't think this dynamic generation is good for "turing numbers", because an advanced autosignup bot software can "read" the "numbers" on images... that's why turing numbers had to be distorted...
for turing numbers, I think most website create all images manually (along with the distorting lines/dots - to confuse the image reader software) then generate the image randomly (the image can also divided into sections, so there'll be more random possiblity)

here's a simple example script on creating an image which shows visitor's IP... this one create the image from nothing...
http://www.allscoop.com/phpcode.php
do the "php help file" download, it's a long list if you want to see all of GD-related commands...
about "treating .jpg as PHP", it's only needed if you want to "submit" the image address to scripts that only accepts common image file extensions...

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |