Jump to content


Photo

Check if External Image Exists


  • Please log in to reply
3 replies to this topic

#1 benn_jgh

benn_jgh
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 April 2006 - 03:31 PM

I'm trying to check if an external image exists. Although there are already several ways to do this in PHP (getimagesize(), fopen() etc), none of these ways are near fast enough. I posted this in the hacking section because I need a very clever way to quickly check whether or not an image exists and I know there isn't a standard function for this.

Thanks

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 17 April 2006 - 04:02 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]I posted this in the hacking section because I need a very clever way to quickly check whether or not an image exists[/quote]
So are you asking how you extend php to do this? I dont think your going to get much quicker than getimagesize(), but you might start by looking at the code for that.

You do know C right?

#3 ccm84

ccm84
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 02 May 2006 - 06:21 PM

I'd believe file_exists() is faster.

#4 benn_jgh

benn_jgh
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 02 May 2006 - 06:28 PM

[!--quoteo(post=370632:date=May 2 2006, 07:21 PM:name=imchase)--][div class=\'quotetop\']QUOTE(imchase @ May 2 2006, 07:21 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I'd believe file_exists() is faster.
[/quote]

I'm sure file_exists() doesn't work for external images though?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users