Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6375501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:37:24+00:00 2026-05-25T01:37:24+00:00

I am creating a google scraper in Adobe AIR using the Flex 4 framework.

  • 0

I am creating a google scraper in Adobe AIR using the Flex 4 framework.
I have run into a brick wall: Google forces a captcha after around 10 pages are read.

Can anyone tell me how to get the page through a proxy server?

I am using HTTPService
Here’s my code:

service=new HTTPService();
service.addEventListener(ResultEvent.RESULT, googleResult);
service.addEventListener(FaultEvent.FAULT, googleFault);
service.resultFormat="text";
service.url=_googleURL+keyPhrase.text
service.send();

Cheers,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:37:25+00:00Added an answer on May 25, 2026 at 1:37 am

    Solution:

    I created a ProxyHTTPService class which extends HTTPService

    package com.pageone.proxyserv {
    
        import mx.rpc.AsyncToken;
        import mx.rpc.http.mxml.HTTPService;
        import mx.utils.URLUtil;
    
        public class ProxyHTTPService extends HTTPService {
            private var _finalURL:String;
    
            private var _tempURL:String;
    
            private var _proxy:Object;
    
            private var phpProxyURL:String="http://myserver/proxy.php";
    
            public function ProxyHTTPService(rootURL:String="") {
                super();
    
            }
    
            public function get proxy():Object
            {
                return _proxy;
            }
    
            public function set proxy(value:Object):void
            {
                _proxy = value;
            }
    
    
            public function get finalURL():String {
                return _finalURL;
            }
    
            public function set finalURL(value:String):void {
                _finalURL=value;
            }
    
            override public function send(parameters:Object=null):AsyncToken {
                this.url=phpProxyURL;
    
                var proxyargs:Object=new Object();
                proxyargs.proxy=_proxy.ip + ":" + _proxy.port;
    
                _tempURL=_finalURL;
                var params:String=URLUtil.objectToString(parameters, "&");;
                if(_finalURL.indexOf("?") > 0) {
                    _tempURL += "&" + params;
                } else {
                    _tempURL += "?" + params;
                }
                _tempURL=encodeURI(_tempURL);
                _tempURL=replaceAll(_tempURL, "%253A", ":");
                _tempURL=replaceAll(_tempURL, "%252F", "/");
    
                proxyargs.url=_tempURL;
    
                return super.send(proxyargs);
            }
    
            private function replaceAll(string:String, find:String, replace:String):String {
                return string.split(find).join(replace);
            }
        }
    }
    

    Then I created a php page on the server

    <?php
    
    $url = $_GET["url"] or die("require url parameter");
    $proxyuri = $_GET["proxy"] or die("require proxy parameter");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
    curl_setopt($ch, CURLOPT_PROXY, $proxyuri);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 GTB7.1');
    
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt ($ch, CURLOPT_HEADER, 0);
    $exec=curl_exec ($ch);
    
    curl_close($ch);
    
    
    ?>
    

    Now in ActionScript, you can call the ProxyHTTPService like this:

    var p:ProxyHTTPService=new ProxyHTTPService;
    p.addEventListenet(ResultEvent.RESULT, resultListener);
    p.addEventListenet(FaultEvent.FAULT, faultListener);
    p.finalURL="http://www.google.com/search";
    p.proxy={ip: "xxx.xxx.xxx.xxx", port:8080};
    p.send({q: "StackOverflow"});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a Google map mashup and am using SQL 2008. I will have
I am working on creating a Google Chrome extension. We have it included in
I'm creating a GWT app in Google App Engine, and using Google data store.
I am creating a map using the new(ish) v3 of the Google Maps API
We're creating a Interaction design pattern website for a class. We've been using google
I am busy with creating a Google map v3 site. If you have a
I'm currently creating a web app using Google's oAuth. I was wondering how I
I'm creating a not-web application using C# and I would like to use Google
I'm creating a graph in php using the google graphing library to show StarCraft
Im looking for some help creating a graph using the google chart API I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.