jinxhacker Posted August 12, 2008 Share Posted August 12, 2008 I need help. im working on having stats in a gif generated in php dies anyone know how. Ive found ways but the reqeuire a .php extension Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 12, 2008 Share Posted August 12, 2008 Ive found ways but the reqeuire a .php extension And the problem with that is...? You can force apache to parse other file extensions as PHP but without knowing what the actual problem is, it's a bit hard to offer you better help. Quote Link to comment Share on other sites More sharing options...
discomatt Posted August 12, 2008 Share Posted August 12, 2008 You want to generate the actual .gif file? Is this for a forum signature or something? Quote Link to comment Share on other sites More sharing options...
dezkit Posted August 12, 2008 Share Posted August 12, 2008 GD LIBRARY Quote Link to comment Share on other sites More sharing options...
jinxhacker Posted August 12, 2008 Author Share Posted August 12, 2008 yes its for forums. i want them as .gifs i can do it as a .php but i dont want that Quote Link to comment Share on other sites More sharing options...
discomatt Posted August 12, 2008 Share Posted August 12, 2008 Your best/easiest bet is to create a custom htaccess rule for a single folder on your site that forces the PHP engine to parse files with the .gif extension. This will cause all sorts of troubles for any actual gif files you put in this folder, though. Quote Link to comment Share on other sites More sharing options...
jinxhacker Posted August 12, 2008 Author Share Posted August 12, 2008 any idea on how to do that cause ive never been good at .htaccess files. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 12, 2008 Share Posted August 12, 2008 AddType application/x-httpd-php .gif As mentioned, you ought to keep that in a separate folder with these images and make sure you don't have any ordinary gifs in the folder. Quote Link to comment Share on other sites More sharing options...
peasepud Posted August 12, 2008 Share Posted August 12, 2008 I dont understand what the problem is though? why is it so important to have the images set as gif's? the GD library works in that way by passing the relevant stuff through a php script therefore it should show that. At the end of the day, what is produced is a gif its merely the URL to produce it that appears to be a php file. Quote Link to comment Share on other sites More sharing options...
mrhobbz Posted August 12, 2008 Share Posted August 12, 2008 I dont understand what the problem is though? why is it so important to have the images set as gif's? the GD library works in that way by passing the relevant stuff through a php script therefore it should show that. At the end of the day, what is produced is a gif its merely the URL to produce it that appears to be a php file. ^ what he said. Quote Link to comment Share on other sites More sharing options...
jinxhacker Posted August 12, 2008 Author Share Posted August 12, 2008 I dont understand what the problem is though? why is it so important to have the images set as gif's? the GD library works in that way by passing the relevant stuff through a php script therefore it should show that. At the end of the day, what is produced is a gif its merely the URL to produce it that appears to be a php file. there going to be shown on forums thru other web sites sort of like what xbox has for gamertags. Quote Link to comment Share on other sites More sharing options...
mrhobbz Posted August 12, 2008 Share Posted August 12, 2008 I dont understand what the problem is though? why is it so important to have the images set as gif's? the GD library works in that way by passing the relevant stuff through a php script therefore it should show that. At the end of the day, what is produced is a gif its merely the URL to produce it that appears to be a php file. there going to be shown on forums thru other web sites sort of like what xbox has for gamertags. IF you're using GD you can still usually stick the script that generates it in an img tag as it outputs the image file. Quote Link to comment Share on other sites More sharing options...
discomatt Posted August 12, 2008 Share Posted August 12, 2008 I dont understand what the problem is though? why is it so important to have the images set as gif's? the GD library works in that way by passing the relevant stuff through a php script therefore it should show that. At the end of the day, what is produced is a gif its merely the URL to produce it that appears to be a php file. Many forums only allow gif/jpg extensions for image URLs. Quote Link to comment Share on other sites More sharing options...
jinxhacker Posted August 13, 2008 Author Share Posted August 13, 2008 AddType application/x-httpd-php .gif As mentioned, you ought to keep that in a separate folder with these images and make sure you don't have any ordinary gifs in the folder. yes this method worked for me. as well as RewriteEngine On RewriteRule modernart.png modernart.php PNG GIF GingerRobot your method is the best method to use it for thank you all for all the help. Quote Link to comment Share on other sites More sharing options...
jinxhacker Posted August 13, 2008 Author Share Posted August 13, 2008 ok so basically this is what it ends up as. AddType application/x-httpd-php .png RewriteEngine On RewriteRule .png captcha.php so what i figured out is that what ever u name it i will work such as http://gmasterz.com/sigs/captcha2.png http://gmasterz.com/sigs/waukdwklkwd.png t http://gmasterz.com/sigs/idontreallyexist.png how would i get just the name out of there so i can create a image that would generates stats for individual users? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 13, 2008 Share Posted August 13, 2008 You'll need to pass the user's name/id in the URL like so: http://yoursite.com/image.png?userid=1 You'd then grab that out the URL and select the relevant information to display (presumably from your database?). Quote Link to comment Share on other sites More sharing options...
jinxhacker Posted August 13, 2008 Author Share Posted August 13, 2008 AddType application/x-httpd-php .png Options +FollowSymlinks RewriteEngine on RewriteRule ([^/]+).png sigs.php?username=$1 yeah i did thanks for all the help. Quote Link to comment Share on other sites More sharing options...
discomatt Posted August 13, 2008 Share Posted August 13, 2008 You shouldn't need both the rewrite rule and addtype. Quote Link to comment 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.