Advertisement
Guest User

Script Link

a guest
May 16th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. function linkSite(){
  2.  
  3.     $busca = 'Youtube';
  4.     $conteudo = file_get_contents("https://www.google.com/search?source=hp&ei=oDWSXM-dOMK75OUPmuyfKA&q=".str_replace(" ","+",$busca));
  5.     $conteudo = explode("<div class=\"g\">", $conteudo);
  6.     $conteudo = $conteudo[1];
  7.     preg_match_all('/href\="(.*?)"/', $conteudo, $novoConteudo);            
  8.     array_shift($novoConteudo);
  9.     print_r(str_replace("/url?q=", "", $novoConteudo[0][0]));
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement