Skip to content

Instantly share code, notes, and snippets.

@kellenmace
Created July 6, 2018 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellenmace/8c4568efcf5cd488545f8a50186c8fcd to your computer and use it in GitHub Desktop.
Save kellenmace/8c4568efcf5cd488545f8a50186c8fcd to your computer and use it in GitHub Desktop.
Remote image file exists function usage
<?php
$image_url = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
if ( km_remote_image_file_exists( $url ) ) {
echo 'The remote image exists! Hooray!';
} else {
echo 'The remote image does not exist. Boooooo.';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment