Misc Links
Forum Archive
News Archive
File DB
 

Ads
 

Advertisement
Your text ad could be here for only $12/month!

Click here for more info!

 

Latest Forum Topics
Disable UAC in windows Vista/7/2008
Posted by Red Squirrel
on Jun 24 2009, 1:52:50 pm

IE 8 update error
Posted by rovingcowboy
on Jun 15 2009, 8:18:40 am

77' Chevy Nova
Posted by MikeDB
on Jun 25 2009, 4:36:46 pm

Bought a house
Posted by Triple6_wild
on Jun 15 2009, 3:22:07 am

computer desk chairs/office chairs
Posted by Onykage
on May 08 2009, 9:57:00 am

 



Send spam to: website@xeonlive.com nick@xeonlive.com georgiapeach1241@aol.com
Making a Dynamic Text Sig
How showing your IP on an image is done.
By Red Squirrel


Most of you probably have seen those forum signatures that show your IP and other information. You might be wondering how in the world is it done. Well this article will attempt to explain this to you. If you read our other article on making a sig with an image that changes, you have learned how you can actually make a fake image file that is really php but to the browser, is an image. The dynamic text/ip sig uses the same concept, but different code.

If you have read the other sig article and already understand the concept, you can skip to the next page. Otherwise, read on.

First, what we want to do is setup a folder where .jpg files will run as php. So make a folder called phpsigs and put this in your .htaccess file:

ForceType application/x-httpd-php

That will simply force all files to run in the php parser. You can go into more htaccess stuff to only make certain files be affected and what not, but to keep things simple, we'll just do it to all files. You just have to make sure not to put anything else in this folder. Only the .htaccess file and the fake image file.

Secondly, we need to create a fake image file. By fake I simply mean that it's not a real image, but code. Let's call it siggy.jpg and put it in the phpsigs. The actual image that will be displayed as the sig can be stored anywhere, on, or outside of the server. The image has to be png, for the code we will use.

On the next page, we'll take a look at the code for this sig.


Next Page
spacer
10559 Hits Pages: [1] [2] 53 Comments
spacer


Latest comments (newest first)
Posted by Onykage on January 01st 2006 (15:37)
There is a way to add the random factor without the read/write perms. Just use the rand() syntax. IE if you have 5 images then set something like the following:

CODE
$someStringName = rand( 1, 5 );
if( $someStringName == 1 ) .. pick some image..
if( $someStringName == 2 ) .. pick some image..
if( $someStringName == 3 ) .. pick some image..
if( $someStringName == 4 ) .. pick some image..
if( $someStringName == 5 ) .. pick some image..


in the php docs on php.net will explain the rest
rand( min, max );

Also you can use the imagettftext syntaxt. This allows for a slightly more presice text insertion. PS. if you dont know already, to use a ttf font that font must be in the same dir as the php source file.

spacer
Posted by Cold Drink on July 07th 2005 (22:22)
As a side note, that random text code is quite nasty. You could do this:

CODE
$text = Array('ichi', 'ni', 'san', 'shi');
$random_index = rand(0, count($text) - 1);
$random_text = $text[$random_index];


It is much easier to maintain this way, too.

spacer
Posted by Guest on July 07th 2005 (19:27)
I figured it out... my font was named Arial.ttf but in the code it was arial.ttf... can't believe i overlooked that. Lol anyway all is well now. Thank you very much.
spacer
Posted by Streety on July 07th 2005 (16:27)
Are both the arial.ttf file and omfghax.png in the same directory?

I really don't know what to suggest. If your host is configured with the GD library I can see no reason why it wouldn't work.

spacer
Posted by Guest on July 07th 2005 (16:19)
I copied your entire code and pasted. Switched $im = imagecreatefrompng("wtf.jpg.png"); to $im = imagecreatefrompng("omfghax.png"); and it says cannot be displayed because of errors.

I had to switch that cause i dont have that file... lol

spacer
View all comments
Post comment


Top Articles Latest Articles
- What are .bin files for? (534604 reads)
- Big Brother and Ndisuio.sys (134493 reads)
- PSP User's Guide (115017 reads)
- SPFDisk (Special Fdisk) Partition Manager (84331 reads)
- Text searching in linux with grep (82051 reads)
- Dynamic Forum Signatures (version 2) (2182 reads)
- Successfully Hacking your iPhone or iTouch (9687 reads)
- Ultima Online Newbie Guide (16559 reads)
- BBcode editor: PHP - The sensible approach (14021 reads)
- The Hitch Hikers guide to "the mouse" (12409 reads)
corner image

This site best viewed in a W3C standard browser at 800*600 or higher
Site design by Red Squirrel | Contact
© Copyright 2009 Ryan Auclair/IceTeks, All rights reserved