Extracting Images from a http:// page

David Burgun dburgun at dsl.pipex.com
Fri Feb 10 07:36:41 EST 2006


Hi Xavier,

That's great! This allows me to extract the list of images, in the form:

<img src="images/JRG9.jpg" width='100' height='100'  border="0">

How can I now display the image at this URL in an Image Object?

I've tried things like:

set the imageSource of image 1 to "full_url/images/JRG9.jpg"

and

put url "full_url/images/JRG9.jpg" into image 1

and

set the imageData of image 1 to url  "full_url/images/JRG9.jpg"


Thanks a lot
Dave

On 10 Feb 2006, at 12:00, xavier.bury at clearstream.com wrote:

> Hi David
>
> It's quite simple:
>
> put url thisurl into mydata
>
> repeat while "<img" is in mydata
>   put offset("<img", mydata) into a
>   put offset(">",mydate, a) into b
>   if b < 1 then exit repeat
>   add a to b
>   put char a to b of mydata & CR after urlList
>   delete char 1 to b of mydata
> end repeat
>
> this should fit any purpose - including where image tags are broken  
> across
> multiple lines....
>
> cheers
> Xavier
>



More information about the use-livecode mailing list