# Detect Change On Server

**URL:** <https://forum.kirupa.com/t/detect-change-on-server/262977>\
**Category:** flash\
**Created:** [June 11, 2008, 3:23pm UTC](https://forum.kirupa.com/t/detect-change-on-server/262977 "2008-06-11T15:23:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xohol](https://avatars.discourse-cdn.com/v4/letter/x/59ef9b/32.png) [@xohol](https://forum.kirupa.com/u/xohol)\
**Post date:** [June 11, 2008, 3:23pm UTC](https://forum.kirupa.com/t/detect-change-on-server/262977/1 "2008-06-11T15:23:57Z")

</div>

Hello,

I am trying to figure out an easy way to detect a change in a text file on a server.

I have 2 kiosks, they both are pulling data from a simple text file that looks like this:

VAR1=43&VAR2=37

One kiosk saves the data to that text file, the other reads it. I want to find a way to that anytime that text file changes, the kiosk that reads it instantly updates.

I had the idea of just using an interval to check it every second, but there has got to be a better way. any ideas?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [June 11, 2008, 3:31pm UTC](https://forum.kirupa.com/t/detect-change-on-server/262977/2 "2008-06-11T15:31:02Z")

</div>

Have you looked into Socket Connections?

---

<div class="post-metadata">

**Author:** ![xohol](https://avatars.discourse-cdn.com/v4/letter/x/59ef9b/32.png) [@xohol](https://forum.kirupa.com/u/xohol)\
**Post date:** [June 11, 2008, 3:39pm UTC](https://forum.kirupa.com/t/detect-change-on-server/262977/3 "2008-06-11T15:39:32Z")

</div>

No, i have not looked into socket connections. im looking at the help file but i can’t seem to find what im looking for exactly. Do i make a socket connection to the text file?

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [June 11, 2008, 7:12pm UTC](https://forum.kirupa.com/t/detect-change-on-server/262977/4 "2008-06-11T19:12:01Z")

</div>

Check out [this tutorial](http://www.gotoandplay.it/_articles/2003/12/xmlSocket_p02.php?PHPSESSID=79ba1a61f658cc3cc467aa0292d72ece). It requires some basic knowledge of Java, but I got it working. You would connect to the XML file and Flash will **_listen_** for update events.
