Jump to content

dynamic png image without loading php page


HaLo2FrEeEk

Recommended Posts

I don't know how to properly explain this, basically, I want someone to be able to load an image from my server, but have the image update itself based on the stats from my forum, kind of like how mygamercard.net has it, you load, for example, http://card.mygamercard.net/marble/pink/HaLo2FrEeEk.png, but the image updates itself, instead of loading, say...http://card.mygamercard.net/marble/pink/gamercard.php?tag=HaLo2FrEeEk.  I want someone to be able to load, say, http://claninfectionist.com/forum/stats/HaLo2FrEeEk.png and it would look like that, but if someone else loaded the picture, it would display their stats.  I don't know it this was a good enough explanation, I'm pretty sure I need a htaccess file to do this, but I don't know how to use htaccess for anything more than to redirect to error pages and stop directory indexing.  If anyone could help me, I would be much appreciative, I can also try to explain it better if you don't understand.

but would this allow someone to load http://claninfectionist.com/forum/stats/HaLo2FrEeEk.png, instead of, perhaps, http://claninfectionist.com/forum/stats/statsig.php?user=HaLo2FrEeEk, since those types of pictures are not displayable on phpbb forums.

Ok, thanks, I'm writing the code for the picture right now, the person that made the picture is sending me the psd so I'll know the coordinates where the stuff is supposed to go, I dropped a .htaccess file with this in it into the folder where the pictures will be stored:

 

RewriteEngine on
RewriteRule ^(.*)\.png$ statsig.php?user=$1

 

which I assume will call statsig.php?user=HaLo2FrEeEk when someone visits HaLo2FrEeEk.png, is this right?

Ok, I got most of the script done, no avatar yet, but here is what I do have:

 

http://claninfectionist.com/misc/testing/statssig.php?user=HaLo2FrEeEk

 

You can change the user value to see the stats for other users on my board, here are some test values:

Ze Popcorn King

KJdog23

Roanoke884

 

but I would still like a little help, I understand how the htaccess works, so its not with that.  I want to center the text inside a certain area, like, the Xbox360 style text looks fine, but Wii (on Ze Popcorn King's) looks bad, is there anyway to center it, as well as the avatar, which can be up to 100 pixels by 100 pixels.  The biggest word size for the board style is 11 characters, Macinscott2, the smallest is 3 characters, Wii.  The max size for usernames is 18 characters.

I could do that with the image, but not the text, since I'm not using imageloadtext, I'm using a ttf font, so I have to use imagettftext, there is a imagettfbbox function that will make an 8 value array with the x and y coordinates of the text inside it, but I don't know how to use it.

i dont quite understand the problem here. If it's an alignment problem then it should be easy to figure. Take a look at the image. If you have the .psd then open it up! Dont write back here until you have done that. You know what you're doing, help is too easily available some of the time.

 

Snooble

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.