Jump to content

Not sure where to ask a site request


KBlount

Recommended Posts

Hi.. I'm a brand new user, and forgive me if I missed the obvious link, but where can I ask for support request? I want to see if I can setup one folder within my site to process .png files through PHP (for dynamically generated images containing script).

 

My account is under the Ads plan, and I only see very general topics here, or a forum for the Ads Unlimited plan.

 

Thanks in advance.

Link to comment
Share on other sites

So, you want to have all PNG files processed by a script? You'll need to use a .htaccess file, utilizing PNG's MIME type to point all matching files to the aforementioned script. Please Google/Wikipedia this, as this information is common across the Apache webserver platform.

Link to comment
Share on other sites

Thanks for the reply, djbob. I had tried that, but found that my .png files were prompted for download, rather than being rendered. My .htaccess file contains a single line of 'AddType application/x-httpd-php .png'.

 

I realise this isn't a PHP support group, but ifyou have any advise, it would be apreciated. I'm googling right now, also ;)

 

Many thanks

Link to comment
Share on other sites

That line won't do you any good, as you're just telling PHP to try processing that file. It'll find no "<?php" marks, so it's pass it on in its raw form as an HTML page and your computer won't see any HTML headers so will just try downloading it.

 

I'm really not sure about what you need to do. But either way, what exactly are you trying to do? It seems to me an easier way of getting the URL's to match would be to use mod_rewrite to point all .png files in the folder you specified to a PHP file with the PNG file in the query string.

Link to comment
Share on other sites

Thanks a million, djbob. While I didn't understand the 'mod_rewrite', I was able to googl it and find something that works. Basically my .htaccess file now looks like this:

 

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

 

This allows ANY .png file to redirect to test.php, and that script renders the .png file correctly. Plus, with a little bit of trickery, I was even able to capture the image name, and use that inside the image.

 

e.g. http://beekay.heliohost.org/phpsigs/djbob.png will show a (very temporary) image withsome stuff and your name on it. There is no physical file called djbob.png, and changing the name to 'whowouldhavethoughtitwouldwork.png' will work too!

 

Thanks for all the help and nudges in the right direction.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...