You are here: Re: Trouble with AddType application/x-httpd-php .png « PHP Programming Language « IT news, forums, messages
Re: Trouble with AddType application/x-httpd-php .png

Posted by Kevin Blount on 10/26/07 21:39

On Oct 26, 11:17 am, Good Man <he...@letsgo.com> wrote:
> "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote innews:op.t0s6ykdv5bnjuv@metallium.lan:
>
>
>
>
>
> > On Fri, 26 Oct 2007 16:31:44 +0200, Good Man <he...@letsgo.com> wrote:
>
> >> "C. (http://symcbean.blogspot.com/)" <colin.mckin...@gmail.com> wrote
> > in
> >>news:1193403723.633067.95850@o3g2000hsb.googlegroups.com:
>
> >>> 2) set the content type for the browser to use in a header(...) call
> >>> in your PHP
>
> >> that is absolutely the way to go. don't mess with apache at all, use
>
> >> <img src="imageDisplay.php?key=39478197">
>
> >> and have imageDisplay.php use:
>
> >> header("Content-type: image/png");
> >> $im = imagecreatefrompng("test.png");
> >> imagepng($im);
>
> > Hmm, that would be unneccessary. Unless you plan to alter the picture,
> > just do a header & a readfile('test.png'); Tremendously saves memory
> > usage.
>
> good one.- Hide quoted text -
>
> - Show quoted text -

Thanks all for the responses. It's much appreciated.

Here's what I ended up using:


AddType application/x-httpd-php .png
RewriteEngine On
RewriteRule .png /phpsigs/create-sig.php


basically just redirects all .PNG requests to a single PHP script, I
can then grab the file name, etc and personalize the image being
returned.

With thankful regards,

BK

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация