SOLVED - How to load a image from the internet

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

SOLVED - How to load a image from the internet

Post by admin12 » Fri Jul 29, 2011 5:13 pm

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
Last edited by admin12 on Mon Aug 01, 2011 6:52 am, edited 1 time in total.

SparkOut
Posts: 2949
Joined: Sun Sep 23, 2007 4:58 pm

Re: How to load a image from the internet

Post by SparkOut » Fri Jul 29, 2011 8:13 pm

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)

admin12
Posts: 412
Joined: Wed May 11, 2011 9:47 am

Re: How to load a image from the internet

Post by admin12 » Fri Jul 29, 2011 8:33 pm

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

Post Reply