Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Image size checking

images php coding issues or problems here.

Moderators: macek, egami, gesf

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.
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.