# Flash and PHP... Problems

**URL:** https://forum.kirupa.com/t/flash-and-php-problems/313405
**Category:** flash
**Created:** [August 29, 2010, 12:42am UTC](https://forum.kirupa.com/t/flash-and-php-problems/313405 "2010-08-29T00:42:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![surf](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@surf](https://forum.kirupa.com/u/surf)
#### Post date: [August 29, 2010, 12:42am UTC](https://forum.kirupa.com/t/flash-and-php-problems/313405/1 "2010-08-29T00:42:52Z")

</div>

i wanted to send some url to a php file which will return a string  
eg [http://domain.com/check.php?url=http%3A%2F%2Fwww.google.com%2F](http://domain.com/check.php?url=http%3A%2F%2Fwww.google.com%2F)

The URL must be urlencoded. what does that mean when  
and wat would be the best way of doin this?

I have been working on this script below but

```auto

var outPut:String = "=http://www.google.com";
var encodedPath:String = escape(outPut);

var serverFile:String = "http://domain.com/check.php?url" + encodedPath;
var variables:URLVariables = new URLVariables();

var urlRequest:URLRequest = new URLRequest(serverFile);
try
{
urlRequest.method = URLRequestMethod.POST;
urlRequest.data = variables;

var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, userResponseHandler);

    urlLoader.load(urlRequest);
}
catch (e:Error)
{
    trace(":::::;" + e.message + " ");
    //handle error here
}
// handler function
function userResponseHandler(evt:Event):void
{
    var caller:URLLoader = URLLoader(evt.target);
    var vars:URLVariables = new URLVariables(caller.data);
    

}

```

and then i get an error

```auto
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
```
