Jump to content

Recommended Posts

Posted

Hey, 

So we have this system that pulls in from an API and downloads images. It's been working great however, the API has been spotty recently. It's been giving us images that are inaccessible or do not exist.

This is the code we have to add images:

if ($type == "0") {
	$p->images->add($url);
}

Pretty simple. Is there a way to check if the image is accessible before trying to download?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...