Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads | All Downloads

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Swish Templates
   SWiSH Climax
   GimpTalk
   Idea Designs
   Sposatoettore
   Try Acai Berry Diet
   Download Free Ringtones
   Swishzone

Manage your site with Flax Article Content Management System
Make a dynamic Signature
Category : PHP / MySQL | Level : Beginner | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

Im sure you have seen some peoples signatures with random quotes and some other things in them, well this is describes how to make your own random quote signature (assuming you have a php enabled server).I seen this on Iceteks.com and thought it would make a good tutorial.

1) Make a new folder and call it randomsig and make sure to put all your files that we are going to make in this folder.

2) Save this picture in your randomsig folder (you can make your own as well but it must be a .png file. This is just an example.)

user posted image

2) Open up notepad or any PHP editor you have and paste this code into a new document.

CODE

<?php
//visit http://www.iceteks.com/articles.php?act=view&article=textsig&p=2& for the code
header("Content-type: image/png");

//change this to the number of random quotes you want (for example if you had 15 quotes it would be $number = rand(1,15);
$number = rand(1,9);
//change your random quotes here
if($number==1)$string2 = "all your base r belong 2 us";
if($number==2)$string2 = "somebody set up us the bomb";
if($number==3)$string2 = "Resistance is futile";
if($number==4)$string2 = "R0D3NTS are cute";
if($number==5)$string2 = "H4X0R in thE yur PC1?!";
if($number==6)$string2 = "Dude w3re's my c4r?";
if($number==7)$string2 = "s0m3on3 st0l3 my mega hurtz!!";
if($number==8)$string2 = "move zig for great justice";
if($number==9)$string2 = "Rodents make the world cool";

//put your image name here (must be a png)
$im = imagecreatefrompng("yourfile.png");
//change your text color here ( must be the hex value) ex. 255,255,255 would be white
$color = imagecolorallocate($im, 255, 255, 255);

//change your X & y coordinates here to place the text on your image where you want it
//(these will center the text on a 400x100 image)
$px=120;
$py=30;
//no need to touch this unless you know what your doing
imagestring($im, 3, $px, $py, $string, $color);
imagestring($im, 2, $px, $py+12, $string2, $color);

imagepng($im);
imagedestroy($im);
?>


3) Read the comments in the code that I have put in and change everything to the way you want.

4) Save your file as randomquote.php (or whatever you want to call it) in your randomsig folder.

5) Since Swish-db or alot of other forums do not allow PHP signatures (for security reasons) we need to force our PHP file to be a png file.

6) Open up notepad and paste this code into a new text document.

CODE

AddType application/x-httpd-php .png


7) Now save your file as .htaccess (you will need to save it with quotes around the file name ".htaccess" otherwise it wont let you save it) and save it in your randomsig folder.

8) Last we need to rename the PHP file we made to randomquote.png

9) Now to put your image in your signature you would just use php file that you renamed to a png.

To see an example go HERE and refresh the page a few times to see the random quotes. If you have any problems feel free to post them smile.gif


All rights reserved - swish-db.com