google suggest scraper - free php script

Status
Not open for further replies.

BackBanana

New member
Sep 2, 2008
332
12
0
shithole england
Rating - 100%
2   0   0
saw someone selling something similar just now, so spent 5 minutes knocking something up. Save yourself 29$

php script, shouldnt need anything special and should work on php4 for those who are retro lol.

should also work on crippled hosts as long as you can use fsockopen.

simply outputs a lists, shouldnt be hard to generate xml or whatever, but this should get you started.

Code:
function text_between($start,$end,$string) {
  if ($start != '') {$temp = explode($start,$string,2);} else {$temp = array('',$string);}
  $temp = explode($end,$temp[1],2);
  return $temp[0];
}
function gsscrape($keyword) {
  $keyword=str_replace(" ","+",$keyword);
  global $kw;
  $data=file_get_contents('http://clients1.google.com/complete/search?hl=en&gl=uk&q='.$keyword);
  $data=explode('[',$data,3);
  $data=explode('],[',$data[2]);
  foreach($data as $temp) {
  $kw[]= text_between('"','"',$temp);
  }
}
#simple to use, just use yourscriptname.php?keywords
if ($_SERVER['QUERY_STRING']!='') {
  gsscrape($_SERVER['QUERY_STRING']);
  foreach ($kw as $keyword) {
  gsscrape($keyword);
  }
}

#all results are in array $kw...
print_r($kw);
cheers:music06:
 


angelina jolie for instance will give you this

Code:
Array
(
    [0] => angelina jolie tattoos
    [1] => angelina jolie films
    [2] => angelina jolie twins
    [3] => angelina jolie movies
    [4] => angelina jolie new film
    [5] => angelina jolie wiki
    [6] => angelina jolie and brad pitt
    [7] => angelina jolie pictures
    [8] => angelina jolie imdb
    [9] => angelina jolie pregnant
    [10] => angelina jolie tattoos and meanings
    [11] => angelina jolie tattoos wanted
    [12] => angelina jolie tattoos in wanted
    [13] => angelina jolie tattoos 2008
    [14] => angelina jolie tattoos mean
    [15] => angelina jolie tattoos billy bob
    [16] => angelina jolie tattoos coordinates
    [17] => angelina jolie tattoos pictures
    [18] => angelina jolie tattoos explained
    [19] => angelina jolie tattoos how many
    [20] => angelina jolie films 2008
    [21] => angelina jolie films list
    [22] => angelina jolie films 2007
    [23] => angelina jolie films online
    [24] => angelina jolie films wikipedia
    [25] => angelina jolie twins pictures
    [26] => angelina jolie twins names
    [27] => angelina jolie twins photos
    [28] => angelina jolie twins again
    [29] => angelina jolie twins born
    [30] => angelina jolie twins ivf
    [31] => angelina jolie twins pictures w magazine
    [32] => angelina jolie twins birth
    [33] => angelina jolie twins latest
    [34] => angelina jolie twins photos 2009
    [35] => angelina jolie movies list
    [36] => angelina jolie movies 2008
    [37] => angelina jolie movies in 2008
    [38] => angelina jolie movies gia
    [39] => angelina jolie movies 2007
    [40] => angelina jolie movies online
    [41] => angelina jolie movies latest
    [42] => angelina jolie movies wikipedia
    [43] => angelina jolie movies download
    [44] => angelina jolie movies free download
    [45] => angelina jolie new films
    [46] => angelina jolie new film 2008
    [47] => angelina jolie new film changeling
    [48] => angelina jolie new film challenging
    [49] => angelina jolie new film clint eastwood
    [50] => angelina jolie new film missing son
    [51] => angelina jolie wikipedia
    [52] => angelina jolie wikiquote
    [53] => angelina jolie wikimedia
    [54] => angelina jolie and brad pitt children
    [55] => angelina jolie and brad pitt married
    [56] => angelina jolie and brad pitt's twins
    [57] => angelina jolie and brad pitt twins
    [58] => angelina jolie and brad pitt wedding
    [59] => angelina jolie and brad pitt split
    [60] => angelina jolie and brad pitt kids
    [61] => angelina jolie and brad pitt latest news
    [62] => angelina jolie and brad pitt's house
    [63] => angelina jolie and brad pitt affair
    [64] => angelina jolie pictures by brad
    [65] => angelina jolie pictures in w magazine
    [66] => angelina jolie pictures hot
    [67] => angelina jolie pictures taken by brad
    [68] => angelina jolie pictures by brad pitt
    [69] => angelina jolie pictures twins
    [70] => angelina jolie pictures tattoos
    [71] => angelina jolie pictures taken by brad pitt
    [72] => angelina jolie pictures w
    [73] => angelina jolie pictures with kids
    [74] => angelina jolie imdb.com
    [75] => angelina jolie imdb bio
    [76] => angelina jolie pregnant again
    [77] => angelina jolie pregnant with 7th child
    [78] => angelina jolie pregnant 2009
    [79] => angelina jolie pregnant with twins again
    [80] => angelina jolie pregnant november 2008
    [81] => angelina jolie pregnant 2008
    [82] => angelina jolie pregnant pictures
    [83] => angelina jolie pregnant again 2008
    [84] => angelina jolie pregnant pics
    [85] => angelina jolie pregnant green dress
 
Irony.
10915686.jpg
 
sweet. non uk people might want to remove the "&gl=uk" btw

sure, the script was really just made up in like 5 minutes, a bit more time spent and you can localise it, add error checking and output in the format of your choice. I may do that if people ask, I don't mind :)

I really just knocked it up because it annoyed me that someone would charge 29$ for a program which i knew wouldnt take long to knock up. if he was asking 5$ i wouldnt of bothered :)
 
saw someone selling something similar just now, so spent 5 minutes knocking something up. Save yourself 29$

you mother fucker son of a bitch !!! mind your words first !!!

i dint force anyone to buy this ebook (SCRAPER) !!! every buyer has a reseller right to sell this book (SCRAPER)!!!

so if you'r not interested why dont you keep your ass shut !!!

some newbies may not be knowing this trick to earn in this method!!! consider that i'm posting for them

and keep your fucking ass shut!!

lol'ing night and day... on a different note, another +rep on that....

Hopefully the idiots will stop migrating over from DP or WF after a while if enough of this happens....
 
LOL, I'm sure you ruined the other guy's day.

+Rep

To be honest I am ok with it. That's the nature of the internet - and I am sure I would have laughed af whole lot more if I wasn't the guy trying to sell it... :)
 
lol'ing night and day... on a different note, another +rep on that....

Hopefully the idiots will stop migrating over from DP or WF after a while if enough of this happens....


Dude your sig is ridiculous, I read that guys post and was lsfh @ it. So the site was deff. appropriate on your end ;)
 
Status
Not open for further replies.