Jump to content

Checking To See If An Image Exists On Another Server...


PHPNewbie55

Recommended Posts

I am trying to check and see if an image file exists on another server...

Basically if the file exists I want to show the file..  if not I want to show a 404 Image instead...

 

But the file_exists("") only seems to work on my server and won;t accurately check if a file exists on another...

Example

///  if the file_exists is checking for a file on my server it works fine.
file_exists("images/someimage.gif");


///  but if I try to check another server it won't work.
file_exists("http://www.doman.com/images/someimage.gif");

Is there a way to check if an image or file exists on another server...???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.