The problem that you're having comes from the fact that you are  
attempting to "scrape" results from the web interface.  Check out the  
AJAX Search API:

http://code.google.com/apis/ajaxsearch

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
[EMAIL PROTECTED]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!




On Nov 18, 2008, at 4:24 PM, gUs wrote:

>
> Hi,
> first of all sorry for my english, i'm french and i sux about it.
>
> I explain you my problem:
> i need to verify for a lots of string that there's at less a result on
> Google, and i have to extract the first result URL.
>
> At the moment, i'm usin that code :
> ****************************************
> $url="http://www.google.com/cse?
> cx=003998484606476030369%3Aqcxubgmcyka&ie=UTF-8&q=%22".
> $string."%22&sa=Rechercher";
> $code=file_get_contents($url);
> $pattern_url_result='&class=r><a href="([^>]*)"&';
> preg_match($pattern_url_result,$code,$url_result);
> print($string."->".$url_result[1]."<br />");
> *****************************************
>
> It works for a moment, but after a while i'm blocked by
> "We're sorry...
> ... but your query looks similar to automated requests from a computer
> virus or spyware application. To protect our users, we can't process
> your request right now. ....."
>
> I need you guys ;)
>
> Thanks.
>
> Cordially.
>
> gUs.
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to