To use ScreenshotMachine with WordPress, keep your customer key and secret phrase on the server, build a URL-encoded request to ScreenshotMachine’s API, send it with WordPress’s HTTP API, and validate the response before displaying or saving it. This guide shows a custom PHP implementation and explains the security, caching, and India-specific details that the available documentation does—and does not—establish.
What the integration needs
ScreenshotMachine documents its screenshot service as an HTTP GET API at https://www.screenshotmachine.com/website-screenshot-api.php. A request requires a customer key and the target page’s url. Optional settings include dimension, format, cacheLimit, delay, and zoom; the API reference should be consulted for the accepted values and current constraints.
The flow in WordPress is: validate the target URL and options, construct the API request on the server, make the outbound request using WordPress’s HTTP API, and only then render or save a verified image. The vendor’s PHP example supports generating a request URL for an image element or retrieving and saving the image. See the ScreenshotMachine PHP package for its client example and installation options.
Choose a WordPress implementation path
| Path | When it may fit | What to check |
|---|---|---|
| Existing shortcode plugin | You want a shortcode-oriented workflow and a suitable plugin is currently maintained and compatible with your WordPress version. | The WordPress.org listing for JSM Screenshot Machine Shortcode establishes that a listing has existed, but the listing alone does not establish its current maintenance quality, compatibility, security, or suitability. Check those details before installing. |
| Custom plugin or theme integration | You need control over credentials, allowed capture options, output behavior, caching, or failure handling. | Use WordPress’s HTTP API, validate and escape data, keep secrets off the public page, and test on your own hosting environment. |
For a maintainable implementation, a small site-specific plugin is generally easier to keep separate from theme changes than code placed directly in a theme template. Whichever path you choose, review the code and access controls rather than assuming a plugin listing alone guarantees a safe configuration.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Store credentials on the server
Use your ScreenshotMachine account’s current dashboard and API documentation to obtain the customer key and determine whether a secret phrase and hash are required for your account configuration. Do not put a secret phrase in a shortcode, page content, browser JavaScript, or publicly visible HTML.
For a site-controlled configuration, define the credentials in protected server configuration such as wp-config.php, outside the public document root where your hosting setup allows it:
define( 'SCREENSHOTMACHINE_KEY', 'your_customer_key' );
define( 'SCREENSHOTMACHINE_SECRET_PHRASE', 'your_secret_phrase' );
Restrict access to server configuration and avoid committing real credentials to a public source repository. The exact request signature must follow the vendor’s current account settings: ScreenshotMachine documents a hash based on the URL value and secret phrase, and says that when a secret phrase is configured, requests with a missing or incorrect hash are ignored. Generate that hash server-side using the vendor’s current instructions; do not guess at its encoding or add a fabricated signing formula.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Build a server-side WordPress request
The following example is a plugin-style function for fetching an image into WordPress. It accepts a target URL and a small allowlist of options, uses wp_remote_get(), and rejects an HTTP error or a response that does not identify itself as an image. Add the function to a custom plugin or a site-specific plugin file; do not expose it directly to anonymous visitors without adding appropriate request authorization and abuse controls.
function mysite_screenshotmachine_image( $target_url, $options = array() ) {
if ( ! defined( 'SCREENSHOTMACHINE_KEY' ) || ! SCREENSHOTMACHINE_KEY ) {
return new WP_Error( 'screenshotmachine_missing_key', 'ScreenshotMachine key is not configured.' );
}
$target_url = esc_url_raw( $target_url );
if ( ! $target_url || ! wp_http_validate_url( $target_url ) ) {
return new WP_Error( 'screenshotmachine_invalid_url', 'Enter a valid target URL.' );
}
$allowed = array( 'dimension', 'format', 'cacheLimit', 'delay', 'zoom' );
$query = array(
'key' => SCREENSHOTMACHINE_KEY,
'url' => $target_url,
);
foreach ( $allowed as $name ) {
if ( isset( $options[ $name ] ) && is_scalar( $options[ $name ] ) ) {
$query[ $name ] = sanitize_text_field( (string) $options[ $name ] );
}
}
// If your account requires a hash, add it here using the vendor's
// current documented signing procedure and server-side secret phrase.
$api_url = add_query_arg( $query, 'https://api.screenshotmachine.com/' );
$response = wp_remote_get( $api_url, array(
'timeout' => 60,
'redirection' => 3,
) );
if ( is_wp_error( $response ) ) {
return $response;
}
$status = (int) wp_remote_retrieve_response_code( $response );
$content_type = (string) wp_remote_retrieve_header( $response, 'content-type' );
$body = wp_remote_retrieve_body( $response );
if ( $status < 200 || $status >= 300 ) {
return new WP_Error( 'screenshotmachine_http_error', 'ScreenshotMachine returned HTTP status ' . $status . '.' );
}
if ( stripos( $content_type, 'image/' ) !== 0 || '' === $body ) {
return new WP_Error( 'screenshotmachine_not_image', 'The API response was not a non-empty image. Check the vendor response and request settings.' );
}
return array(
'content_type' => $content_type,
'body' => $body,
);
}
WordPress documents its HTTP API as the mechanism for requests to external services; its plugin guidance recommends the HTTP API over custom cURL calls. See HTTP API – Plugin Handbook and Common issues – Plugin Handbook.
Validate inputs beyond sanitizing strings
The example validates that the URL is syntactically acceptable to WordPress and sanitizes option strings, but production code should also enforce the values and ranges allowed by the current ScreenshotMachine API reference. An allowlist is safer than forwarding arbitrary user-supplied query parameters. If visitors can choose a target, consider restricting schemes to HTTPS and applying an explicit domain allowlist; otherwise an endpoint on your site could be abused to make requests to unintended destinations.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Do not assume every response is an image
Vendor APIs can return an error body rather than image bytes. The example checks status, content type, and non-empty content before accepting a response. For diagnosis, log a sanitized error category and status code server-side; do not expose credentials or a raw request URL containing the key in page output or public logs.
Display the screenshot or save it
There are two common output choices. A generated ScreenshotMachine URL can be used in an image element, as in the vendor’s PHP example, but any key or signing material included in that URL may be visible to visitors and may appear in logs or caches. For a public page, follow the vendor’s recommendation to safeguard direct public-HTML calls with the documented hash parameter when applicable.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Alternatively, retrieve the image server-side as in the function above, then save it to the WordPress uploads area or serve it through a controlled endpoint. This gives your code a place to validate the response and manage retention, but it adds storage and cache-invalidation work. Escape any URL when rendering an image element, for example with esc_url(), and escape attribute values with the appropriate WordPress escaping function. Do not print untrusted data directly into HTML.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Cache captures when freshness allows
WordPress transients provide a time-limited cache and are suitable for keeping a previously generated result or reference when the target page does not need to be recaptured on every visit. Use a cache key derived from the normalized target URL and the capture options so that different dimensions or formats do not collide. Set the expiration based on how fresh the screenshot must be, and refresh or invalidate the cached value when the target or relevant options change.
ScreenshotMachine also documents a cacheLimit request option. That API-side setting and a WordPress transient are separate caching layers: decide deliberately whether you need both, and check the vendor’s current API reference for the accepted range. The documentation cited here gives a 0–14 day range; verify that this remains current before relying on it.
India-specific considerations
The cited ScreenshotMachine and WordPress documentation describes the general API and implementation, not India-specific service availability, billing currency, taxes, account eligibility, data location, latency, or support terms. Do not infer those details from a generic API example. Before deploying for an India-based site, confirm the current commercial and service terms directly with ScreenshotMachine and test from the actual WordPress host and representative target pages. Your host’s location and network path can affect observed behavior, but the sources cited here do not establish a performance figure for India.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Test and troubleshoot the integration
- WordPress returns a transport error: inspect the
WP_Errormessage server-side, then check outbound HTTP access, DNS, TLS configuration, and hosting firewall restrictions. Test from the actual host rather than assuming a local development result applies. - The response is HTTP success but not an image: check the content type and vendor response, confirm the key and target URL, and review the ScreenshotMachine account’s current required parameters. Do not save an error response as an image.
- The request is rejected when using a secret phrase: confirm whether the current account configuration requires a hash and generate it according to the vendor’s current documented procedure. A missing or incorrect hash is ignored when a secret phrase has been configured.
- The screenshot is stale: inspect both the WordPress transient expiration and the API’s
cacheLimitsetting. Refresh or invalidate the WordPress value when the target page or capture options change. - The capture differs from the expected page: test representative target pages and adjust only documented capture settings, such as delay or dimensions, as needed. The vendor examples establish available controls, not that a particular setting will work identically for every target or host.
- A shortcode plugin is incompatible or unclear: review its current WordPress.org compatibility and maintenance information before installation; the existence of a directory listing is not proof of current suitability.
WordPress’s general plugin guidance also covers sanitization, validation, and escaping practices: Common issues – Plugin Handbook.
Or skip the browser setup
If the real goal is simply to obtain a page screenshot from code, ScreenshotNeo offers a one-request screenshot API with clean-shot handling. Its API can remove cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed; and its MCP server lets AI agents take screenshots. It includes 1,000 screenshots a month free with no card, and paid plans start at $5 for 3,000.
For example, this cURL request returns a WebP screenshot of a target page:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteFrequently Asked Questions
Can I use ScreenshotMachine with a WordPress shortcode?
A WordPress.org listing exists for JSM Screenshot Machine Shortcode. Check its current maintenance, compatibility, and security information before using it; the listing by itself does not establish that it is currently the right choice.
Does ScreenshotMachine confirm India pricing or data residency?
The sources cited here do not establish India-specific pricing, taxes, account eligibility, data location, support terms, or performance. Confirm current terms with ScreenshotMachine.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

