This code works for me.
You can create one page and call it anything. For example: googlelinks.php
<?php
$url="http://www.google.com/cse?cx=partner-pub-0410003301463017%3Ae93v05tbzd2&ie=ISO-8859-1&q=forex&sa=Search";
$data = file_get_contents( $url );
//echo $data; // this is all the code from that google page
// Make it only the 'Ads by Google part
$text1 = strstr($data, '<table cellspacing=0 cellpadding=0 width=30% align=right bgcolor="#ffffff" border=0 class=ra>');
$text2 = strstr(substr($text1,6),'</table>', true);
// Find those links in $text2
preg_match_all('#<span class=a>(.*)</span><br>#U', $text2, $matches);
//echo '<pre>'.print_r($matches,true).'</pre>';
$links = $matches[1];
// display 5 links
foreach($links AS $item){
echo $item.'<br>';
}
?>
Will output
www.ForexYard.com
www.gnuTrade.com
www.signaltrading.net
www.Easy-Forex.com/Sweden
www.fxscalpingmethod.com