# \[Q\] URLLoader not working?

**URL:** <https://forum.kirupa.com/t/q-urlloader-not-working/265467>\
**Category:** Uncategorized\
**Created:** [July 9, 2008, 7:58am UTC](https://forum.kirupa.com/t/q-urlloader-not-working/265467 "2008-07-09T07:58:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manfree](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@manfree](https://forum.kirupa.com/u/manfree)\
**Post date:** [July 9, 2008, 7:58am UTC](https://forum.kirupa.com/t/q-urlloader-not-working/265467/1 "2008-07-09T07:58:10Z")

</div>

Hi all,  
I am trying to update the database via a SWF file in every 10 second

I am using the URLLoader to load the file [http://127.0.0.1/plus\_one.php](http://127.0.0.1/plus_one.php)  
This PHP file can do the increment in database  
([http://127.0.0.1/plus\_one.php](http://127.0.0.1/plus_one.php) works well and fine if open in a browser)

If put it into the AS3 … It works fine for the frist 10 seconds…  
but after the next 20 seconds, there is no more increment to the database …

How ever … if i change the 127.0.0.1 to localhost…  
It works again for the first 10 seconds, but not working after the next 20 seconds …

Is there any people can help ?

```auto
 
 
var vPath:String = "http://127.0.0.1/plus_one.php";
var ldr:URLLoader = new URLLoader();
var req:URLRequest = new URLRequest(vPath);
var t:Timer = new Timer(10000);
ldr.addEventListener(Event.OPEN, onOpen);
ldr.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHttpStatus);
ldr.addEventListener(SecurityErrorEvent.SECURITY_ERROR,onSecurityError);
ldr.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
ldr.addEventListener(Event.COMPLETE, onComplete);
t.addEventListener(TimerEvent.TIMER, addOne);
t.start();
 
function addOne(e:TimerEvent):void {
 ldr.load(req);
}
function onOpen(e:Event):void {
 trace("OK");
}
function onHttpStatus(e:HTTPStatusEvent):void {
 trace("HTTP Status: " + e.status);
}
function onSecurityError(e:SecurityErrorEvent):void {
 trace("Security Error: " + e.text);
}
function onIOError(e:IOErrorEvent):void {
 trace("IO Error: " +e.text);
}
function onComplete(e:Event):void {
 trace("Complete: ");
}

```

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [July 9, 2008, 10:51am UTC](https://forum.kirupa.com/t/q-urlloader-not-working/265467/2 "2008-07-09T10:51:05Z")

</div>

Are you testing it on the server, or from within the flash ide? If the latter then it is not calling that url after the first time because flash thinks it can use a cached version. I believe that is the problem.
