Skip to content

Commit db85783

Browse files
committed
docs: update readme
1 parent c8611d4 commit db85783

1 file changed

Lines changed: 22 additions & 13 deletions

File tree

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ file_put_contents('screenshot.png', $result['data']);
4040

4141
### Web scraping example
4242
```php
43+
<?php
44+
4345
use ScreenshotMax\SDK;
4446
use ScreenshotMax\Options\ScrapeOptions;
4547

@@ -58,6 +60,8 @@ file_put_contents('scrape.html', $result['data']);
5860

5961
### PDF generation example
6062
```php
63+
<?php
64+
6165
use ScreenshotMax\SDK;
6266
use ScreenshotMax\Options\PDFOptions;
6367

@@ -76,25 +80,30 @@ file_put_contents('pdf.pdf', $result['data']);
7680

7781
### Scheduled task example
7882
```php
83+
<?php
84+
7985
use ScreenshotMax\SDK;
8086

8187
$sdk = new SDK('<ACCESS_KEY>', '<SECRET_KEY>');
8288

8389
# get all tasks from account
8490
$tasks = $sdk->task->get_tasks()
85-
# {"tasks":[{
86-
# "id":5678133109850112,
87-
# "name":"Test CRON",
88-
# "api":"screenshot",
89-
# "query":
90-
# "url=https%3A%2F%2Fexample.com",
91-
# "frequency":"every_day",
92-
# "crontab":"25 13 * * *",
93-
# "timezone":"Etc/UTC",
94-
# "enabled":true,
95-
# "created":1747229104,
96-
# "last_run":1748611516,
97-
# "runs":18}]}
91+
print_r($tasks['data']);
92+
93+
/* {"tasks":[{
94+
"id":5678133109850112,
95+
"name":"Test CRON",
96+
"api":"screenshot",
97+
"query":
98+
"url=https%3A%2F%2Fexample.com",
99+
"frequency":"every_day",
100+
"crontab":"25 13 * * *",
101+
"timezone":"Etc/UTC",
102+
"enabled":true,
103+
"created":1747229104,
104+
"last_run":1748611516,
105+
"runs":18}]}
106+
*/
98107
```
99108

100109
## License

0 commit comments

Comments
 (0)