• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1136
  • Last Modified:

flex-fetch html code using httpservice post

I want to fetch html source code returned from google/or any other page.
Below is the sample code. the code should print the html source code in the textarea.

let me know where should I do changes to html source code?
do I need to change below by any other code?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns="*" creationComplete="send_data()">
            private function send_data():void {
    <mx:HTTPService id="userRequest" url="http://www.google.com/" useProxy="false" method="POST">
        <mx:request xmlns="">
    <mx:TextArea x="10" y="31" width="403" height="174" id="txtarea" text="{userRequest.lastResult}"/>

Open in new window

1 Solution

Unless google implement an open crossdomain.xml file, httpservice will not download data from google as the domain is different to the one the application is hosted on.  If this is the case, you need to implement a script on your website that gets the data for you and returns it.

SimonHowaldAuthor Commented:
Thanks for letting me know... I hope php + curl lib would be sufficient to use the same logic in server-side.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now