Generate image from html with php

后端 未结 2 2004
不思量自难忘°
不思量自难忘° 2020-12-20 12:51

For some security reasons, I would like to generate an image based on Google Calendar embed iframe, to be able to show it on a website who don\'t allow iframes.

Is t

相关标签:
2条回答
  • 2020-12-20 13:32

    The library wkhtmltoimage works perfectly.

    I have created a page to embed the google calendar (the url can't be reach directly).

    I generate a picture from this page and I link this image on my profile on the website.

    Thanks heaps for the comments.

    0 讨论(0)
  • 2020-12-20 13:46

    functions from the GD library to output an image of the current screen

    <?php
    //All of your normal code would go here
    //But before exiting, grab a snapshot
    $image = imagegrabscreen();
    imagejpeg($image,"my_screenshot.jpeg");
    imagedestroy($image);
    ?>
    

    Or use

    websnapr lets you capture screenshots of (almost) any web page. Allow your visitors to instantly visualize any web page before clicking. Increase site traffic, click-through rate and site stickiness.

    0 讨论(0)
提交回复
热议问题