Quantcast

Jump to content


Photo

Dynamic images


  • Please log in to reply
3 replies to this topic

#1 Melchoire

Melchoire
  • 5284 posts


Users Awards

Posted 18 December 2009 - 07:23 PM

So I'm trying to display stats from my bungie profile onto an image that I created. But obviously these stats are constantly changing and that's where the dynamic part comes in. So if you could point me to a tutorial on how do this that would be great. I googled it already but they all came up with PHP tutorials and I don't even know where to get started with PHP.

#2 414de7fe6

414de7fe6
  • 2559 posts

Posted 18 December 2009 - 09:52 PM

You'll need to use the GD library with PHP in order to generate dynamic images with relative ease - it requires a little bit of fiddling with .htaccess and you'll also need to write a backend parser in PHP (or some language that interfaces with it readily) in order to retrieve the data you want to display in the first place.

It's nothing gigantic - those tutorials that you brought up on google should walk you through the GD bit, but writing the parser will be a whole other ballpark entirely.

Link me to the page in question and I'll have a see if I can write a parser precursor for you. No guarantees, though. :p

#3 Melchoire

Melchoire
  • 5284 posts


Users Awards

Posted 18 December 2009 - 10:43 PM

You'll need to use the GD library with PHP in order to generate dynamic images with relative ease - it requires a little bit of fiddling with .htaccess and you'll also need to write a backend parser in PHP (or some language that interfaces with it readily) in order to retrieve the data you want to display in the first place.

It's nothing gigantic - those tutorials that you brought up on google should walk you through the GD bit, but writing the parser will be a whole other ballpark entirely.

Link me to the page in question and I'll have a see if I can write a parser precursor for you. No guarantees, though. :p

Actually the parser will be the easiest part imo. The webpage doesn't require a login:
http://www.bungie.ne...layer=Melchoire
I would just be parsing out some numbers.

Now why exactly do i need to fiddle with .htaccess? Should I be concerned about how to host the image?



#4 Waser Lave

Waser Lave

  • 25516 posts


Users Awards

Posted 19 December 2009 - 04:09 AM

The .htaccess part is only necessary if the place where you're going to post the image restricts the filetypes on images. For example forums like Neocodex restrict images to the normal image file types like .gif, .jpeg, .png etc and wouldn't accept a .php file as an image.

So using .htaccess you can essentially give a php file an image file type, so pointing to say example.png would actually load example.php and so display the image.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users