Website screenshots

前端 未结 26 3539
长发绾君心
长发绾君心 2020-11-21 06:07

Is there any way of taking a screenshot of a website in PHP, then saving it to a file?

相关标签:
26条回答
  • 2020-11-21 07:09

    After a lot for surfing on web I found this.

    PPTRAAS > A free tool to capture screenshot by passing your URL as a parameter

    They provide multiple options by simply hitting their URL.

    1. Get full page screenshot

      https://pptraas.com/screenshot?url={YOU URL HERE}

    2. Get page screenshot of specific size

      https://pptraas.com/screenshot?url={YOU URL HERE}&size=400,400

    3. One can even convert the page to pdf

      https://pptraas.com/pdf?url={YOU URL HERE}

    0 讨论(0)
  • 2020-11-21 07:12

    I used bluga. The api allows you to take 100 snapshots a month without paying, but sometimes it uses more than 1 credit for a single page. I just finished upgrading a drupal module, Bluga WebThumbs to drupal 7 which allows you to print a thumbnail in a template or input filter.

    The main advantage to using this api is that it allows you to specify browser dimensions in case you use adaptive css, so I am using it to get renderings for the mobile and tablet layout as well as the regular one.

    There are api clients for the following languages:

    PHP, Python, Ruby, Java, .Net C#, Perl and Bash (the shell script looks like it requires perl)

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