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 Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/ 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-614681 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? Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-614684 Share on other sites More sharing options...
dezkit Posted August 12, 2008 Share Posted August 12, 2008 GD LIBRARY Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-614685 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 Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-614701 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-614982 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615068 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615072 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615081 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615086 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615099 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615110 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615114 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615161 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? Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615198 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?). Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615268 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615572 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. Link to comment https://forums.phpfreaks.com/topic/119324-php-gif-images/#findComment-615576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.