Newbie Spellweaver
- Joined
- Apr 21, 2008
- Messages
- 10
- Reaction score
- 0
What is Dynamic image?
Dynamic images are created with php. also u can use Mysql data in it.
And that is why this release is here ^^
What does this release got?
-Automaticly Update [Dynamic]
-Saves the image in the map.
Sample :
UPDATE 2 Got :
-Sig Request Page
-Additional Background
-Additional Text Colors
-Additional Border Colors
UPDATE 2
Keep the copyrights, unless ur a thief
Setup :
-Unrar on ur webserver.
-*Connect :
* = after ?name= ur name. ex : image.php?name=Unicorn
Usage On a Site
Usage On Forum
Remove the * from [img*]
IP & Name can be changed.
Questions? Bugs? Comments? All are welcome!
Dynamic images are created with php. also u can use Mysql data in it.
And that is why this release is here ^^
What does this release got?
-Automaticly Update [Dynamic]
-Saves the image in the map.
Sample :
UPDATE 2 Got :
-Sig Request Page
-Additional Background
-Additional Text Colors
-Additional Border Colors
UPDATE 2
PHP:
<?php
// Copyrights to UnicornBritt. All rights Reserved.
// Keep the copyrights, unless ur a thief :(
$pagename = 'Your Image ';
function createImage(){
session_start();
$host = "localhost";
$user = "root";
$pass = "";
$db = "maplestory";
$dbhandle = mysql_connect("localhost", "root", "")
or die("Unable to connect to MySQL");
$selected = mysql_select_db("maplestory",$dbhandle)
or die("No data.");
if(!isset($_GET['name'])){
die("No Character has filled in.");
}
$name = $_GET["name"];
$background = $_GET['bg'];
$color = $_GET['color'];
$border = $_GET['border'];
$result = mysql_query("SELECT * FROM characters WHERE name='$name'");
$background = ($background.'.png');
//Database
mysql_close($dbhandle);
//Font
$font = 'Arial.ttf';
//Startpunt
$y = 50;
//Grootte
$width = 306;
$height = 101;
//Background
$im = imagecreatefrompng($background);
// Kleuren
$white = ImageColorAllocate($im, 255, 255, 255);
$black = ImageColorAllocate($im, 0, 0, 0);
$red = ImageColorAllocate($im, 255, 0, 0);
$blue = ImageColorAllocate($im, 0,0,255);
$pink = ImageColorAllocate($im, 255, 142, 238);
// BORDER
if ($border == 'white'){
ImageRectangle($im, 0, 0, $width-1, $height-1, $white);
}
if ($border == 'black'){
ImageRectangle($im, 0, 0, $width-1, $height-1, $black);
}
if ($border == 'red'){
ImageRectangle($im, 0, 0, $width-1, $height-1, $red);
}
if ($border == 'blue'){
ImageRectangle($im, 0, 0, $width-1, $height-1, $blue);
}
if ($border == 'pink'){
ImageRectangle($im, 0, 0, $width-1, $height-1, $pink);
}
while ($row = mysql_fetch_object($result)) {
// COLOR TEXTS
if ($color == 'white'){
ImageTTFText($im, 8, 0, 100, $y+($bar_height-21), $white, $font, $row->name. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+1), $white, $font, $row->level. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+21), $white, $font, $row->fame. '');
}
if ($color == 'black'){
ImageTTFText($im, 8, 0, 100, $y+($bar_height-21), $black, $font, $row->name. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+1), $black, $font, $row->level. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+21), $black, $font, $row->fame. '');
}
if ($color == 'red'){
ImageTTFText($im, 8, 0, 100, $y+($bar_height-21), $red, $font, $row->name. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+1), $red, $font, $row->level. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+21), $red, $font, $row->fame. '');
}
if ($color == 'blue'){
ImageTTFText($im, 8, 0, 100, $y+($bar_height-21), $blue, $font, $row->name. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+1), $blue, $font, $row->level. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+21), $blue, $font, $row->fame. '');
}
if ($color == 'pink'){
ImageTTFText($im, 8, 0, 100, $y+($bar_height-21), $pink, $font, $row->name. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+1), $pink, $font, $row->level. '');
ImageTTFText($im, 8, 0, 100, $y+($bar_height+21), $pink, $font, $row->fame. '');
}
// Backupp =D
#ImageTTFText($image, 10, 0, 150, $y+($bar_height-30), $blue, $font, $row->level. '');
}
header("Content-Type: image/png");
$namethingy = $_GET['name'];
$outfile= "$namethingy.png";
imagepng($im,$outfile);
}
$name = $_GET["name"];
$result = mysql_query("SELECT * FROM characters WHERE name='$name'");
// Copyrights to UnicornBritt. All rights Reserved.
// Keep the copyrights, unless ur a thief :(
?>
<title><? echo "Your Image - ".$name;?></title>
<link href="../style.css" rel="stylesheet" type="text/css">
<center>
<table width="497" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="496" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="19" height="33" align="left" background="../images/seo1.gif"></td>
<td width="471" height="33" background="../images/seo2.gif" class="td3">
<center><?=$pagename.$name?></center>
</td>
<td width="7" height="33" align="right" background="../images/seo3.gif"></td>
<tr>
<td height="41" colspan="3" class="mb3">
<?
echo "<br><center><IMG SRC=".createImage()."".$name.".png><br><br>
";
?>
<input type="button" value="Back" onMouseDown="javascript:history.go(-1)">
</td>
</tr>
<tr>
<td colspan="3"><img src="../images/seo5.gif" width="496" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
Keep the copyrights, unless ur a thief
Setup :
-Unrar on ur webserver.
-*Connect :
You must be registered to see links
* = after ?name= ur name. ex : image.php?name=Unicorn
Usage On a Site
Code:
<img src="http://127.0.0.1/sig/image.php?name=Unicorn">
Code:
[img*]http://127.0.0.1/sig/image.php?name=Unicorn">[/img]
Remove the * from [img*]
IP & Name can be changed.
Questions? Bugs? Comments? All are welcome!
Attachments
You must be registered for see attachments list
Last edited: