Page 1 of 1

SOLVED - How to load a image from the internet

Posted: Fri Jul 29, 2011 5:13 pm
by admin12
I know it's probably easy, but my code is not working.

I have an image box (imgCandidate) that is roughly 140x140

I saved the url of the image to the database and read it back in into a field called fldPicPath

So, in this case, the fldPicPath contains:

http://www.travelandworkusa.com/public_ ... bundle.bmp

Now I am trying to load that image into the thumbnail image box (imgCandidate). Here is the code I wrote:

set the filename of image "imgCandidate" to the text of field "fldPicPath"

Please help me re-write that line so it works.

Thank you.

Mike

Re: How to load a image from the internet

Posted: Fri Jul 29, 2011 8:13 pm
by SparkOut
Looks like you are using the full path relative to the server document root. To find the file from external place you need the domain pathe relative to the web root. In this case try dropping the "public_html/" part of the path.
(I tried following that path without public_html and it leads to a destination that requires authorisation, so that may introduce other complications)

Re: How to load a image from the internet

Posted: Fri Jul 29, 2011 8:33 pm
by admin12
Good point. I did encrypt the file folder (.htaccess) for protection.

Perhaps I should make a thumbnail image and load it in?

How can I create a 140x140 thumbnail image (proportionally correct)?

Mike