Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function google($dork,$pag){
- $ch = curl_init();
- $opcoes = array(CURLOPT_URL => "http://ajax.googleapis.com/ajax/services/search/web?v=2.0&q={$dork}&start={$pag}",
- CURLOPT_HEADER => false,
- CURLOPT_RETURNTRANSFER=>1,
- CURLOPT_REFERER=>"http://google.com");
- curl_setopt_array($ch, $opcoes);
- $resultado= curl_exec($ch);
- curl_close($ch);
- //Processando a string Json
- $json = json_decode($resultado);
- //Array com os resultados
- $array = $json->responseData->results;
- //Total de resultados retornados
- foreach($array as $key){
- $resultado_url = $key->url;
- $resultado_url = urldecode($resultado_url);
- echo "{$resultado_url}\n";
- }
- }
- $i = 0;
- while($i<40){
- echo google("noticias+site:br+inurl:id?=",$i);
- $i=$i+4;
- }
- ?>
Add Comment
Please, Sign In to add comment