custom image generator

Any problem with PHP can be disscused here
derangedtaco
Posts: 78
Joined: Sun Feb 26, 2006 4:21 pm

custom image generator

Post by derangedtaco »

how can i make an image with variable content? like, for example, have a picture of a taco and say the viewer's IP on it. just as an example...

how could i do it? oh and it needs to be custom.. so there should be an input where the user can put in their name... can anybody help me?


Visit derangedtaco.com, a developing online community.
mohumben
Posts: 82
Joined: Thu Sep 15, 2005 9:45 pm

Post by mohumben »

Well, use Image Functions (requires a library called GD; to check if your server has it installed use phpinfo(); )

Code: Select all

<?php

header("Content-type: image/png");

$image = @imagecreatefromjpeg('taco.jpg');

$color = ****($image, 0, 0, 255);
imagestring($image, 5, 20, 80, 'Hey, your IP address is:' , $color);
imagestring($image, 5, 80, 140, $_SERVER['REMOTE_ADDR'] , $color);

imagepng($image);

imagedestroy($image);

?>
Before:
Image
After:
Image

Code: Select all

define('I_LOVE_PHP', true);
derangedtaco
Posts: 78
Joined: Sun Feb 26, 2006 4:21 pm

Post by derangedtaco »

hey, wow. i didnt think anyone was going to help me out. thanks!!!

now, can anybody help me out with this?? i need a blank diploma-like thing.. for papapotato.com. you'll enter in your name to convert, then it'll have your name on the certificate afterwards :lol:
Visit derangedtaco.com, a developing online community.
mohumben
Posts: 82
Joined: Thu Sep 15, 2005 9:45 pm

Post by mohumben »

Oh, sure.
Give me your layout and the fonts you want to use... I think I can code the script :)

I just need a template; the place where the variables are going to be printed should be obviously blank...

Code: Select all

define('I_LOVE_PHP', true);
mohumben
Posts: 82
Joined: Thu Sep 15, 2005 9:45 pm

Post by mohumben »

OK, found some Google'd some images... What resulted in:

Image
Image

You can change it's name... Is this your idea?

Code: Select all

define('I_LOVE_PHP', true);
iPod Wizard
Posts: 987
Joined: Sun Feb 26, 2006 4:56 pm
Contact:

Post by iPod Wizard »

Wow, you're really good at this stuff...hope you can do more...
derangedtaco
Posts: 78
Joined: Sun Feb 26, 2006 4:21 pm

Post by derangedtaco »

w00t w00t perfect!!! photoshopping now, i'll get back to you

edit.... hmm... i need a good font like that.. do you know which one they used, or can you give me a link to something like it, please?
Visit derangedtaco.com, a developing online community.
mohumben
Posts: 82
Joined: Thu Sep 15, 2005 9:45 pm

Post by mohumben »

The top (where it says "Php University") one is Grafik Text, the handwriting cursive one is AdineKinberg-Script, and the other is Blackletter686 BT.

They are all free fonts AFAIK so you should be able to download them.

Code: Select all

define('I_LOVE_PHP', true);
derangedtaco
Posts: 78
Joined: Sun Feb 26, 2006 4:21 pm

Post by derangedtaco »

mohumben wrote:The top (where it says "Php University") one is Grafik Text, the handwriting cursive one is AdineKinberg-Script, and the other is Blackletter686 BT.

They are all free fonts AFAIK so you should be able to download them.
looks like you have to pay for blackletter :cry:

http://www.myfonts.com/PurchaseOptions?id[]=1031

or is it something else you're talking about? a free "clone" maybe?
Visit derangedtaco.com, a developing online community.
derangedtaco
Posts: 78
Joined: Sun Feb 26, 2006 4:21 pm

Post by derangedtaco »

any help...?

also...... just another quickie question
http://papapotato.com/index.php?option= ... &Itemid=43
the border around the "convert now" image... how can i kill that? it's in the css, right?
Visit derangedtaco.com, a developing online community.
Post Reply