Flash and PHP... Problems

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

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


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

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