• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[PHP] Picture Signatures for your server. TFS SQL ONLY.

MrSheen

Php & Lua.
Joined
Jun 14, 2007
Messages
159
Reaction score
2
Location
Nottingham, England
Hey guys!
I got asked to make a script to create a image signature for my friends server and thought thats its only fair to release it so other people can use it too!

What it does, It shows the character name, level, magic level and vocation on a picture. It's pretty simple but can be used for forums and stuff.

Example:

http://www.theforgottenrealms.net/sig/signature.php?name=MrSheen

signature.php


Of course, if you know what your doing you can change the script to do what ever you like:

How to set it up!

Easy to set up. Upload the 3 files in the rar onto your web server. (It needs to have the GD2 Image enabled, but most servers already do. Second edit the top of the script to your preferences.

Code:
	$Mysql_Host = 'localhost'; //The location of your MYSQL Server
	$Mysql_User = ''; //The Username for your MYSQL Server
	$Mysql_Password = ''; //The Password for your MYSQL Server
	$Mysql_Database = ''; //The Database name for your TFS Server
	
	$Server_Name = 'The Forgotten Realms'; //The name of your server
	$Server_Address = 'www.theforgottenrealms.net'; //the web address or slogan for your server
	
	$Font_File = 'arial.ttf'; //The font file for your server! 
	$Background_Picture = 'background.png'; //The location of the background picture for the signature (322 x 122)

Its pretty simple.

How to link to it:

To create the picture you just simply do:

Code:
<img src="http://YOURWEBSERVER/signature.php?name=NAME">

or

[ img]http://YOURWEBSERVER/signature.php?name=NAME[/img]

And that will create your image.
Enjoy.
 

Attachments

Last edited:
Code:
	$Background_Picture = 'background.png'; //The location of the background picture for the signature (322 x 122)

How can I make it load a picture from a direct url?

From an internett link instead of hosting it myself? :)

but still
signature.php


Rox :D
 
This code is vulnerable to SQL injections.

Patch:
Code:
--- signature.php       2008-11-16 18:39:27.000000000 +0100
+++ signature.php       2008-11-16 18:40:40.000000000 +0100
@@ -49,7 +49,7 @@
        if ( isset( $_GET['name'] ) ) {

                //See if the player name entered is found in the datbase:
[COLOR="Red"][B]-               $Player_Query = mysql_query ( "SELECT * FROM `players` WHERE `name`='".$_GET['name']."'" );[/B][/COLOR]
[COLOR="Green"][B]+               $Player_Query = mysql_query ( "SELECT * FROM `players` WHERE `name`='" . mysql_real_escape_string($_GET['name']) . "'" );[/B][/COLOR]

                if ( mysql_num_rows ( $Player_Query ) > 0 ) {
 
Link for example is not working :( could u add new? :p I want to see how it look first before download, So please mate! :p

Code:
The requested URL /sig/signature.php was not found on this server.
 
Back
Top