You are invited to Log in or Register a free Frihost Account!

Sig with a random quote

I had saw people with sig like that, where the quotes shown are randomize and I know it requires php to do that. But I am nuts at that, can anyone show me how?
You need your webserver to hold a page with code similar to the following at

It will create a dynamic image. You need a stock of quotes to use also.
They can be in a file or database just like simple php. Read up on this on
The Conspirator
I tried something like that, and it worked perfectly but when I added [img][/img] It nerver showed the image just the bbcode.
You need the image to store on the server and change during specified time periods, that way you just link to the image. Or something.
dynamic images in signatures are banned in frihost.
The Conspirator
The Conspirator wrote:
I tried something like that, and it worked perfectly but when I added [img][/img] It nerver showed the image just the bbcode.

Thats because php is not a valid image extention. You should've had [*img][*/img] or something.

Why cant we have dinamic ones btw? Daniel15 is a mod and he has one:
kv wrote:
dynamic images in signatures are banned in frihost.

Dynamic images are not banned on FriHost.

Rule 4d on the Rules Page states:

Signatures with dynamic information about users browsing the forums, like from danasoft, are not allowed. (eg: Your browser is firefox and your ip is ... )

Dan's like the one above are allowed. It shows information about him which he wants to be displayed.
Stubru Freak
bbscript doesn't accept images having no known image extension. (You could do that on a normal web page)
So you have these options:
- Tell your server to parse .png files as php.
- Tell your server to rewrite file requests for .png files to the same file ending in .php with mod_rewrite

I'd recommend the second one, you can set it to work for only one directory or one file.
The htaccess would look like

RewriteEngine on
RewriteRule .*\.(PNG|png)$

I checked it, but not with a forum.
I thought it worked pretty well to make a folder with a filename like whatever.png, and inside the folder place the PHP script, name it index.php.

Whenever the image is displayed, it goes right to the folder. Like browsing, it will try to go to the file named index. So the index.php file will be accessed, and it's almost like you're fooling the BBCode into thinking it's an ordinary png file.

That's how the images in my sig work, give it a shot. As you can see, I have a total of 3 dynamic images in my signature, the first of which produces a random quote. I tried to make it look like I actually typed it in my sig, it could have come out worse. Refresh a few times, I packed 27 different quotes into that script.

Once you put the folder (with the index.php file in it) into the directory in place of your random_black.php file, you can simply use this BBCode tag to handle it:

Make sense to you?

PS: If you don't believe it will work, take a closer look at the dynamic sig for Daniel15 above. Look at the filename, it doesn't say .php anywhere in it Smile.
Nice trick. I liked it better than rewrite rules.
Why all the hassle! Just use this:
Now THATS simple.
is there ny way to get a dynamic stats sig for runescape like does ?
Related topics
Hey guys, want a free sig?
Avatars and Signatures for sale!
Random image for your gallery
Random page generator
My Photography, and hideousness in all its glory
My newest sig.
Sig Wanted
Signature and Banners for All
Simple full Sig tutorial
Selling Community ad space! DDS
Random Image
Rent O'calhoun's sig space; ]]One Week Free Sale[[ *Open*
[PHP] Problem with Dynamic Sig's Font Color
Dynamic sig (know the click)
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

© 2005-2011 Frihost, forums powered by phpBB.