Jump to content


help with using a .php as an image


3 replies to this topic

#1 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 06 March 2006 - 04:59 PM

well i spent awhile last night(new to php) and finaly put together a .php that reads from a text file and it generates a signature with the text. but i have a problem. many times i have tryed using it as an image(it has the header line) but it doesnt work. the forums say its not a valid image format. wat do i need to do for it to accept it as an image? or is there a way around this?

thanks in advance.

High6

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 06 March 2006 - 05:58 PM

Forums don't accept it because of the extension, it's a security measure. The only way around it is to change it to a valid image extension, and then have your server redirect "image_name/path.jpg" to "php_image.php"

Note: Do not try and do that here, dynamic signatures will get you banned from these forums.

#3 high6

    Young Padawan

  • Members
  • Pip
  • 57 posts

Posted 06 March 2006 - 06:12 PM

View Postrc69, on Mar 6 2006, 05:58 PM, said:

Forums don't accept it because of the extension, it's a security measure. The only way around it is to change it to a valid image extension, and then have your server redirect "image_name/path.jpg" to "php_image.php"

Note: Do not try and do that here, dynamic signatures will get you banned from these forums.

i wasnt going to do it here. can u give me a quick tut on how to do that?

#4 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 10 March 2006 - 09:26 AM

You would have to use htaccess
RewriteEngine On
RewriteRule sig.gif sig.php
Will simply redirect sig.gif to sig.php





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users