#!/usr/bin/perl -I/server/GoogleProxy/GoogleProxy

#########################################
##### Author:		Sebastian Enger / B.Sc
##### CopyRight:	BitJoe GmbH
##### LastModified	16.07.2006
##### Function:		IO spezifisches Modul
##### Todo:			
########################################

package GoogleProxy::Google;

use strict;

my $GoogleApiKey 	= "AIzaSyAcvn-vGugDlvBilWabtpfGeC619KQxo_w";
my $referrer 		= "http://www.msn.com/"; # This should be a valid referer for the above key


sub new(){
	
	my $self = bless {}, shift;
	return $self;
		
}; # new()

sub setRequest() {
	
	my $self	= shift;
	my $page	= shift;
	my $filetype = shift;
	my $searchquery = shift;
	
my $search = Google::Search->Web(
	key => $GoogleApiKey, referrer => $referrer, # "referer =>" Would work too
	query => { q => $searchquery, sll => "33.823230,-116.512110" }
);

$search->all;
