Jump to content

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


Dreamer67
 Share

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.