Image size checking

images php coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Thu Mar 20, 2003 2:36 pm

getimagesize will work on remote files - fopen will not (short of using sockets/ftp access)

just use @getimagesize('http://......') and test that $return[2] is not equal to zero (zero means it is not an image).

note: it would not work on gifs or on images protected by a direct linking protection script.

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 2 guests