Page 1 of 1
Making .php look like .png for forums
Posted: Sat Mar 07, 2009 7:55 am
by Donkey
Hi, i have a dynamic sig I wish for my users to use on forums:
http://extremeteenforums.com/forums/sig.php
However, it does not work in [img] tags as it is a .php file. I need a way to make it look like a .png file so this would work..
Help please.
Re: Making .php look like .png for forums
Posted: Sat Mar 07, 2009 2:50 pm
by Mark Baker
Code: Select all
<img src="http://extremeteenforums.com/forums/sig.php">
is perfectly valid and should work without any problems, so long as sig.php actually returns a valid image with the appropriate headers.
If it isn't working, then the problem is somewhere in sig.php, but as we have no idea what the code looks like, we can't do much to help
Re: Making .php look like .png for forums
Posted: Sun Mar 08, 2009 3:52 am
by Donkey
Hi,
I was trying to use it on forums which didn't allow embedded php (for obvious reason)-
But I have got this to work by creating a sub directory called signature.png, and putting it there as index.php
Re: Making .php look like .png for forums
Posted: Sun Mar 08, 2009 3:54 am
by requinix
You can actually use a URL like
Code: Select all
http://extremeteenforums.com/forums/sig.php/image.png
If sig.php exists then the "/image.png" at the end won't make any difference.
Re: Making .php look like .png for forums
Posted: Sun Mar 08, 2009 5:01 pm
by panic!
assuming you're using apache, if the url is
http://extremeteenforums.com/forums/sig.php
in the /forums/ folder create a text file called .htaccess and within it paste:
Code: Select all
RewriteEngine On
RewriteRule sig.png sig.php
and now
http://extremeteenforums.com/forums/sig.png will be routed into sig.php by apache.
Re: Making .php look like .png for forums
Posted: Mon Mar 09, 2009 11:21 am
by Donkey
This was really practical and useful, thanks!
Re: Making .php look like .png for forums
Posted: Mon Mar 09, 2009 4:25 pm
by panic!