Flava Posted June 10, 2007 Share Posted June 10, 2007 Hey everyone, I'm currently running a website that generates dynamic images for users, for use in their signatures on forums. For example, I have created an image file (using PHP) and the address is http://www.website.com/tags/tag.php?u=Flava (an example). However, it seems that some forums block the ?u=Flava and so doesn't display it correctly - so instead, I would prefer to link to addresses such as http://www.website.com/tags/Flava.php (so that the users username, is in fact the filename). I know this is possible as I have seen it done elsewhere, however I am not too sure how to achieve it. Any help greatly appreciated! Link to comment https://forums.phpfreaks.com/topic/55010-solved-files-and-directory-extensions/ Share on other sites More sharing options...
Hypnos Posted June 10, 2007 Share Posted June 10, 2007 I generate forum signatures on my site. What I do to be forum friendly is use forward slashes, and trail it with a .png. IE: http://www.website.com/tags/tag.php/Flava/tag.png It gives the illusion that you're sending tag.png, even though your server is actually runing tag.php. Then, you can explode the $_SERVER['REQUEST_URI'] to get the data in the url ("/Flava/") and use it as input. It works well for me. You can also use mod rewrite to form a real .png address from a get query. Link to comment https://forums.phpfreaks.com/topic/55010-solved-files-and-directory-extensions/#findComment-271951 Share on other sites More sharing options...
Flava Posted June 10, 2007 Author Share Posted June 10, 2007 Ah that is very very clever! Thanks for the help - I'll try it out now! Link to comment https://forums.phpfreaks.com/topic/55010-solved-files-and-directory-extensions/#findComment-271952 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.