Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Aug 5, 2018
1 parent c6e2817 commit 85fcfae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build
composer.lock
docs
vendor
.phpunit.result.cache
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ Browsershot::url('https://example.com')

#### Setting the user agent


If, for some reason, you want to set the user agent Google Chrome should use when taking the screenshot you can do so:
If you want to set the user agent Google Chrome should use when taking the screenshot you can do so:

```php
Browsershot::url('https://example.com')
Expand All @@ -450,16 +449,14 @@ Browsershot::url('https://example.com')

#### Setting the CSS media type of the page


You can also emulate the media type, especially usefull when you're generating pdf shots, because it will try to emulate the print version of the page by default.
You can emulate the media type, especially usefull when you're generating pdf shots, because it will try to emulate the print version of the page by default.

```php
Browsershot::url('https://example.com')
->emulateMedia('screen') // "screen", "print" (default) or null (passing null disables the emulation).
->savePdf($pathToPdf);
```


The default timeout of Browsershot is set to 60 seconds. Of course, you can modify this timeout:

```php
Expand Down Expand Up @@ -508,9 +505,9 @@ Browsershot::url('https://example.com')
...
```

#### Setting Cookies
#### Using Cookies

To add cookies to HTTP headers, pass an array containing cookie key/value pairs to `useCookies` method:
You can add cookies to the request to the given url:

```php
Browsershot::url('https://example.com')
Expand Down

0 comments on commit 85fcfae

Please sign in to comment.