Dreamer67 Posted July 6, 2014 Share Posted July 6, 2014 after spending many hours thinking this through and not really getting anywhere, trying to figure out how this site works, so that i can replicate it and make a single image from multiple images that are positioned overlaying with css positioning the site in question is: http://www.dahippo.com/bp/ship/#!704J01Q180O0K0E013C3A3C3A3636360ZZ0ZZ0ZZ0ZZ it is a type of calculator for an online game, the part that interests me is the image of the ship that is built up from many images is also uses a php script to place all these images into on image file outputted to html, this is what interests me and i am trying to recreate, like here: http://www.dahippo.com/bp/ship/get.php?image=4J01Q180O0K0E013C3A3C3A3636360ZZ0ZZ0ZZ0ZZ here is the outputted html: <html> <head> <meta name="viewport" content="width=device-width, minimum-scale=0.1"> <title>get.php (635x317)</title> </head> <body style="margin: 0px;"> <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;" src="http://www.dahippo.com/bp/ship/get.php?image=4J01Q180O0K0E013C3A3C3A3636360ZZ0ZZ0ZZ0ZZ" width="408" height="204"> </body> </html> what php code used in the get.php script make all these images with css positioning into 1 image? i have asked the site owner, and got no reply :/ Quote Link to comment Share on other sites More sharing options...
Dreamer67 Posted July 6, 2014 Author Share Posted July 6, 2014 i did a lot of googling and looking around different sites, and found this getImage.php script: <?php $url = $_GET['url']; // Website URL to Create Image $name = $_GET['img']; // Output Image Name $command = "/usr/bin/wkhtmltoimage --no-images --load-error-handling ignore"; $dir_img = "/var/www/html/images/"; // Image files will be saved here $ex_cmd = "$command $url " . $dir_img . $name; $output = shell_exec($ex_cmd); ?> but this script is saving an image for every URL. where the site i am creating will create an image for each it would go over my servers limit of 40,000 files, is there a way to create images on the fly without the need to save each individual image? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted July 7, 2014 Share Posted July 7, 2014 https://github.com/craig552uk/getImage/blob/master/getimage.php Quote Link to comment Share on other sites More sharing options...
Dreamer67 Posted July 8, 2014 Author Share Posted July 8, 2014 thanks darkfreaks, works good getting all the images together into one image, but how do i position the images from a CSS file? 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.