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
(Turing + school)|(help + google)==iceteks
Posted by Red Squirrel
on Oct 03 2008, 3:20:24 pm

home page news
Posted by Red Squirrel
on Sep 29 2008, 4:53:08 pm

help a trojan messed up my system.
Posted by rovingcowboy
on Oct 01 2008, 5:01:37 pm

dance crew
Posted by rovingcowboy
on Sep 05 2008, 8:28:45 am

Huge boobs
Posted by Red Squirrel
on Sep 04 2008, 5:15:53 pm

 



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
9380 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? (397377 reads)
- Big Brother and Ndisuio.sys (126195 reads)
- PSP User's Guide (104071 reads)
- SPFDisk (Special Fdisk) Partition Manager (72741 reads)
- Tutorial on how to burn an ISO image (63640 reads)
- Successfully Hacking your iPhone or iTouch (3381 reads)
- Ultima Online Newbie Guide (10949 reads)
- BBcode editor: PHP - The sensible approach (11601 reads)
- The Hitch Hikers guide to "the mouse" (10669 reads)
- Setting up a Backup Server (24273 reads)
corner image

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