regdude Posted April 15, 2008 Share Posted April 15, 2008 Hi, I made an dynamic image but the problem is that most forums doesn't support them. I have seen that some dynamic images uses something like this: /sig/sig_2.jpg Can someone help me with creating such a script from a simple dynamic image? Quote Link to comment https://forums.phpfreaks.com/topic/101243-dynamic-images/ Share on other sites More sharing options...
micah1701 Posted April 15, 2008 Share Posted April 15, 2008 I don't think anyone understands what you're asking. are you saying you've created an dynamic image with a .php extension and therfore can't use it in your forums because they don't end in .jpg or .gif? Quote Link to comment https://forums.phpfreaks.com/topic/101243-dynamic-images/#findComment-517901 Share on other sites More sharing options...
laffin Posted April 15, 2008 Share Posted April 15, 2008 Look into path_info setup of Apache and php. if pathinfo is setup u can have urls like http://www.xxx.yyy/sig.php/my.jpg Quote Link to comment https://forums.phpfreaks.com/topic/101243-dynamic-images/#findComment-517904 Share on other sites More sharing options...
regdude Posted April 15, 2008 Author Share Posted April 15, 2008 Ok, i will try to explain bit more. I use an dynamic image, but it goes like sig.php?id=1! When i use this link(full link ofcourse) in a forum i get only a link of the image, thats because they have disabled dynamic images. I want to make an image that will be dynamic but could go in forum, i have seen them somethinh like this: sig_1.jpg I guess there is a script in this dynamic image and a .htaccess script wich makes these 'sig_x.jpg' Quote Link to comment https://forums.phpfreaks.com/topic/101243-dynamic-images/#findComment-517912 Share on other sites More sharing options...
micah1701 Posted April 15, 2008 Share Posted April 15, 2008 ok, so stick your php file in its own folder then create a text file name .htaccess in that same directory and add something like: RewriteEngine on RewriteRule ^(.*)\.jpg$ $1.php [nc] then when you tell the forum that your image is at yourdomain.com/sig/sig.jpg they'll think their loading a JPG but your server will know that its really displaying a PHP file Quote Link to comment https://forums.phpfreaks.com/topic/101243-dynamic-images/#findComment-517928 Share on other sites More sharing options...
regdude Posted April 15, 2008 Author Share Posted April 15, 2008 I forgot to say that im using Linux and Lighttpd. Anyway... this is my sig file: /sig/tag.php i use this for someones data: /sig/tag.php?id=1 i use this in /sig/ folder ar .htaccess: RewriteEngine on RewriteRule ^(.*)/.jpg$ $tag.php [nc] also i used an example from popular these kind of things "psychotag" and i made this in root: RewriteEngine on RewriteRule ^samp/tag_([0-9].*).png /samp/tag.php?id=$1 [L,PT] wich also doesn't work. Quote Link to comment https://forums.phpfreaks.com/topic/101243-dynamic-images/#findComment-517965 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.