# Connect to internet from Local?

**URL:** <https://forum.kirupa.com/t/connect-to-internet-from-local/301689>\
**Category:** flash\
**Created:** [December 14, 2009, 9:26am UTC](https://forum.kirupa.com/t/connect-to-internet-from-local/301689 "2009-12-14T09:26:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaniko93](https://avatars.discourse-cdn.com/v4/letter/z/dbc845/32.png) [@zhaniko93](https://forum.kirupa.com/u/zhaniko93)\
**Post date:** [December 14, 2009, 9:26am UTC](https://forum.kirupa.com/t/connect-to-internet-from-local/301689/1 "2009-12-14T09:26:21Z")

</div>

Hi all. I need to connect to internet from local file. when I try, I get warning about trying to connect to internet and the when I hit ‘OK’, I get error:  
SecurityError: Error #2028: Local-with-filesystem SWF file file:///D|/Flash/proj2/game.swf cannot access Internet URL [http://localhost/flash/proj1/upload\_score.php](http://localhost/flash/proj1/upload_score.php).  
at [flash.net](http://flash.net)::URLStream/load()  
at [flash.net](http://flash.net)::URLLoader/load()  
at game\_fla::MainTimeline/frame2()  
at flash.display::MovieClip/gotoAndStop()  
at game\_fla::MainTimeline/checkmyhit()  
at game\_fla::MainTimeline/moveChar()

All I try is to connect to localhost with URLLoader and get data from there. here is my code:

```auto

var rqst:URLRequest = new URLRequest('http://localhost/flash/proj1/upload_score.php');
var ldr:URLLoader = new URLLoader();
ldr.addEventListener(Event.COMPLETE, cmplloading);
ldr.load(rqst);

function cmplloading(e:Event)	{
	trace(ldr.data);
}

```

Is there any way to connect to Internet from local? If I upload this page on web, it works fine but I need local connection.
