Page 1 of 1

import an image/information from a remote html page

Posted: Mon Apr 23, 2007 8:01 am
by sarah2007
Hallo,

1/I'd like to import a dynamic image(f(t)) from a distant server by simply calling the URL stocked in my database (example http://xxx.yyy.zzz.200/Sectorr1/florida/florida-day.png),when I click on a button I'd like to display the image on the footer of my page.The problem is that the whole html page is displayed and not only the image.How could I display only the image?

2/I'd like to import some information (variable) from a distant html page.Could you please help me

Thanks[/img]

Posted: Mon Apr 23, 2007 8:37 am
by superdezign
You can't control remote content. For all I know, they purposely generate full HTML when their files are remotely accessed, and if they don't provide a way for you to do what it is that you'd like to, chances are that you weren't meant to do so.

If you REALLY want to do it, javascript would be able to extract the elements that you want or remove the elements that you don't.

Posted: Mon Apr 23, 2007 10:15 am
by sarah2007
Hi,

Thanks superdesign.I have full priveleges upon the remote server.the files are generated automatically by the MRTG tool (multirouter traffic graph)
I can save the images as "png" in a folder and then call them but the process is heavy as the graphs change each 5 min.

Thanks

Posted: Mon Apr 23, 2007 10:36 am
by John Cartwright
superdezign wrote:You can't control remote content. For all I know, they purposely generate full HTML when their files are remotely accessed, and if they don't provide a way for you to do what it is that you'd like to, chances are that you weren't meant to do so.

If you REALLY want to do it, javascript would be able to extract the elements that you want or remove the elements that you don't.
file_get_contents(), preg_match()?