# Pulling the latest URL from HTTP File

**URL:** <https://forum.inductiveautomation.com/t/pulling-the-latest-url-from-http-file/91356>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 4, 2024, 5:54pm UTC](https://forum.inductiveautomation.com/t/pulling-the-latest-url-from-http-file/91356 "2024-06-04T17:54:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hayden\_Hinton](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Hayden\_Hinton](https://forum.inductiveautomation.com/u/Hayden_Hinton)\
**Post date:** [June 4, 2024, 5:54pm UTC](https://forum.inductiveautomation.com/t/pulling-the-latest-url-from-http-file/91356/1 "2024-06-04T17:54:21Z")

</div>

I'm trying to capture an image with a Cognex Dimensioner that saves the .bmp image files in a folder using FTP and then having a local HTTP server that Ignition pulls the latest file's URL from. The URL is then put into a Tag for a Perspective image source to use. I'm having been trying to do this through an Gateway Event Script but haven't had any success getting usable data just a byte array from the HTML. Is there a good tool for what I'm trying to accomplish or a correct way to write the script to get a usable URL?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 4, 2024, 6:07pm UTC](https://forum.inductiveautomation.com/t/pulling-the-latest-url-from-http-file/91356/2 "2024-06-04T18:07:15Z")

</div>

You have to parse the HTML (I recommend using java's XML tools via my utility script [xml.py](https://www.automation-pros.com/ignition/xml.py)), then finding the embedded image element. Extract the `src` attribute from that to place in your tag.
