Hooker Posted May 16, 2009 Share Posted May 16, 2009 Hey, I have a MySQL db table which looks like this: ID | Name | ImageURL | XSize | YSize I wonderd if anyone could explain or point me in the right direction of a tutorial where i could take that information and generate an image based on the dimensions in the table and the image held at the url in the "ImageURL" field and be able to include it on a page like this: <img src="http://www.website.com/pic.php"> Any help would be greatly appreciated, Chris Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/ Share on other sites More sharing options...
MasterACE14 Posted May 16, 2009 Share Posted May 16, 2009 here's a tutorial on it. Generate Image with PHP and an example of one similar that I've made is in my signature. Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/#findComment-835558 Share on other sites More sharing options...
Hooker Posted May 17, 2009 Author Share Posted May 17, 2009 why kinda stress does it cause to the server with this method/are there any better methods of doing this? Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/#findComment-835568 Share on other sites More sharing options...
MasterACE14 Posted May 17, 2009 Share Posted May 17, 2009 I believe very little. I'm assuming that this would be for a dynamic image? so you will need to add the headers related to No Cache. Which it doesn't mention in that tut. Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/#findComment-835571 Share on other sites More sharing options...
Hooker Posted May 17, 2009 Author Share Posted May 17, 2009 its just for a link exchange script for a friend, no text added, just need a random image chosen from a database and shown on forums and such that can track the clicks. Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/#findComment-835572 Share on other sites More sharing options...
Hooker Posted May 17, 2009 Author Share Posted May 17, 2009 also, if i have something like: <a href="www.website.com/link.php?id=12345"><img src="http://www.website.com/pic.php" border="0"></a> Or [url="www.website.com/link.php?id=12345"][img=http://www.website.com/pic.php][/url] And i grabbed the image out of a db to generate "pic.php" is there anyway to get the ID of the pic generated, in the link like "link.php?id=12345&pic=123" Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/#findComment-835588 Share on other sites More sharing options...
Hooker Posted May 17, 2009 Author Share Posted May 17, 2009 bump Link to comment https://forums.phpfreaks.com/topic/158438-php-image-generation/#findComment-835807 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.