Forum Moderators: coopster

Message Too Old, No Replies

img url saving to MySQL database

         

Modern Merlin

6:34 am on Sep 1, 2008 (gmt 0)

10+ Year Member



Ok so I have searched all over the place and have yet to be able to find what I am looking for.

What I am trying to do is setup a section in a site that has a profile. In the this profile the user would be able to link two images to two separate loaders (don't have much space on the server for uploads).

Well I got the flash (CS3, AS 2.0) to send the URL to PHP which in turn writes it to the Database. However, what I would like to know is how I would go about checking the URL to make sure the filesize is below a certain size and that in fact it is an image they are linking to.

I have found [ca3.php.net...] and various other scripts that talk about file uploads and checking those. I'm just not sure how I would use it for a URL?

Any help would be great! Thanks!

phranque

9:29 am on Sep 1, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you could use the HttpMessage class [ca3.php.net].

use the getHeaders method to examine the Content-Length: and Content-Type: HTTP Response headers.
maybe use the guessContentType method if you are being extra careful.