Jump to content

how does this site work? re: facebook share post image


Dreamer67

Recommended Posts

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 :/

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.