Hi, I'm developing an application which will allow a user to submit a series of keywords and this will check with Google the following: Number of matches in all of website Number of matches in the titles e.g. "intitle" Number of matches in the anchor text e.g. "inanchor" One thing I have noticed is how slow the facility works. I'm not quite sure what is causing this, it could be my scripting or Google. Here is the process I go through to obtain an array of results. Get the users keywords into an array Loop over the words and search Google for the relevant word in the relevant search area Please find an example of this process here: function google_results_intitle($keyword) { //Function: Returns array of total google matches within website title set_time_limit(1000); $gs = new GoogleSearch(); $gs->setKey($this->goog_key); $gs->setMaxResults(1); $gs->setSafeSearch(true); foreach($keyword as $key=>$val){ /* * We're using a do/while loop to counter the problem * of http header errors */ $gs->setQueryString("intitle:\"$val\""); do{ $search_result = $gs->doSearch(); ##do the search if($gs->getError()){ $receivedError++; ##increment error count sleep(5); ##sleep script for 5 seconds }else{ $receivedError=0; ##reset error count } //end if } while ( $receivedError && ($receivedError <= $maxErrorsAllowed)); $search[$val] = $search_result->result[estimatedTotalResultsCount]; } //end foreach return $search; } //end function PHP: I'm using the do/while loop (which i obtained from the Google site) to combat the problem with HTTP headers causing problems with 502 issues. But, the script runs so slow, it can take anything up to two minutes to obtain an array of results for each word and sometimes some results are missing. How can I speed up this script? Thanks in advance