Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function linkSite(){
- $busca = 'Youtube';
- $conteudo = file_get_contents("https://www.google.com/search?source=hp&ei=oDWSXM-dOMK75OUPmuyfKA&q=".str_replace(" ","+",$busca));
- $conteudo = explode("<div class=\"g\">", $conteudo);
- $conteudo = $conteudo[1];
- preg_match_all('/href\="(.*?)"/', $conteudo, $novoConteudo);
- array_shift($novoConteudo);
- print_r(str_replace("/url?q=", "", $novoConteudo[0][0]));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement