<?php
require 'vendor/autoload.php';

$client = new Browshot(getenv('BROWSHOT_API_KEY'));
$response = $client->simple(array(
  'url' => 'https://example.com/',
  'country' => 'in',
  'device' => 'iphone_15_pro'
));
if ($response['code'] != 200) {
    throw new RuntimeException('Capture failed: HTTP ' . $response['code']);
}
file_put_contents('capture.png', $response['image']);
