View Single Post
Old 01-22-2008, 07:45 AM   #1 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default A form of a image class..

Hey!

I'm having a problem..
I wanna code a class, that would let me do something like this:

php Code:
$image = new TibiaChar('Mortis Dominus');
if($image) {
      echo $image->getImageCode();
}
else {
      echo 'Character does not exist!';
}

And that would search Tibia - Free Multiplayer Online Role Playing Game - News character page for Mortis Dominus, and if it exists, it would do some fetching of the data on that character page, and create an image for it.
Character page is: Tibia - Free Multiplayer Online Role Playing Game - Community

Then it would echo out a image code, such as "www.domain.com/images/mortis_dominus.png" so I can use it as a dynamic image.

How would I achieve this?
I know I have to use file_get_contents, and also use the PHP GD library..

I have an example here:
Tibia - Character Image
Tanax is offline  
Reply With Quote