Website screenshots

前端 未结 26 3475
长发绾君心
长发绾君心 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: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)

提交回复
热议问题