Jump to content

Recommended Posts

Hello,

 

i want to check whether image exist or not, but i can't get any data about it. I have tried everything: getimagesize, file_exist, filesize, etc.

 

<?

$info = @getimagesize('http://jargames.eu/ic.php?lf=files/All phone/240x320/007-quantum_of_solace_240x320.jar');
if(isset($info['mime'])){echo 'Image exist';}
else{echo 'Image doesnt exist';}

?>

Ty, for your help.

Link to comment
https://forums.phpfreaks.com/topic/220139-check-whether-image-exist-or-not/
Share on other sites

Yes ManiacDan, you are right. I have 2 links:

 

First link shows image - 007-quantum_of_solace_240x320.jar - http://jargames.eu/ic.php?lf=files/All%20phone/240x320/007-quantum_of_solace_240x320.jar

Second link doesn't show image - 20_q_mind_reader_240x320.jar - http://jargames.eu/ic.php?lf=files/All%20phone/240x320/20_q_mind_reader_240x320.jar

 

So, i need somehow to check using php shows these links images or not.

Both of those files are accessible, but one of them isn't a valid image.

 

You will have to copy them to the local filesystem and perform your operations on them there.

 

This is a bad idea, however, since in my tests it took nearly 4 seconds to even OPEN these files.  This webserver is too slow to be relied upon for your own site's functionality.

 

-Dan

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.