Mango's codes pwnz
What you can do to temporarily solve this is to save the rings etc from Tibia wikia.i have a problem when some one use a item that shine like golden ignot or soft boots rings bla bla bla all the 3 slot of the bottom bug it :S
Use it however you feel like using it. I don't even mind if you earn money by using it. All I ask for is that the copyright inside the file remains.I just created a new Signature API for my otlist (new PHP edition), and now I see that you made something that is 90% the same before me (mine got a few extra things, not so important). Damn, now I feel shitty about my waste of time
Can I assume this is public domain/BSD?
class MadGDCache
{
/**
* @var array
*/
protected $_options = array(
'path' => 'cache',
'lifetime' => 600 // seconds
);
/**
* @param array $options
* @return void
*/
public function __construct(Array $options = array())
{
foreach($options as $options => $value)
{
$this->_options[$option] = $value;
}
}
public function load($name)
{
$path = $this->_options['path'] . DIRECTORY_SEPARATOR . $name;
if (file_exists($path) && filemtime($path) < (time() + $this->_options['lifetime'])) {
return file_get_contents($path);
}
return false;
}
public function save($name, MadGD $image)
{
$path = $this->_options['path'] . DIRECTORY_SEPARATOR . $name;
// Not sure if the imagepng will overwrite an existing file
if(file_exists($path)) {
unlink($path);
}
imagepng($image->instance, $path, 9 );
}
}
$cache = new MadGDCache(array(
'path' => dirname(__FILE__) . '/cache'
));
if (! $image = $cache->load('character_id_10010')) {
$image = new MadGD;
$image->setBackground('mySignature.png');
$image->addText('This is my awesome sentance!')->setPosition(10, 10);
$cache->save('character_id_10010', $image);
ob_start();
imagepng($image->instance, '', 9);
$image = ob_get_clean();
}
header('Content-Type: image/png');
echo $image;
How i can add php in this? np: $image->setBackground(''.$belu.'.png'); <-- on this is error...