Pessoal eu estava pensando se é possivel fazer um script em php pra buscar dados em outra página, por exemplo:
digamos que eu queria pegar dados de uma página mediante uma busca, ou seja, eu passo uma string... o script vai na outra página... "utiliza" a busca dessa página, e trás os resultado pra minha página, é possivel?

Script Para Buscar Dados De Uma Outra Página
Started By phpnovato, 03/01/2009, 21:07
3 replies to this topic
#1
Posted 03/01/2009, 21:07
#2
Posted 03/01/2009, 22:50
Para fazer isto você teria que utilizar a biblioteca curl ou até mesmo função file do php se o site usar string de busca na url.
Ex: http://www.google.co...rch?hl=pt-BR&q=busca&btnG=Pesquisa+Google&meta=&aq=f&oq=
Ex: http://www.google.co...rch?hl=pt-BR&q=busca&btnG=Pesquisa+Google&meta=&aq=f&oq=
http://www.liveworks.com.br : Soluções para internet
http://www.phpmysqljquery.com.br : PHP, MySQL e jQuery
http://www.passoapasso.info : Minhas dicas
http://www.phpmysqljquery.com.br : PHP, MySQL e jQuery
http://www.passoapasso.info : Minhas dicas
#3
Posted 06/01/2009, 13:30
$pagina = file_get_contents ("http://google.com/q=cachorrinhos");
e o conteudo da página para busca de cachorrinhos ficara em $pagina
e o conteudo da página para busca de cachorrinhos ficara em $pagina
#4
Posted 07/01/2009, 08:56
Dica: Se o caso for de busca em arquivos .html e afins do mesmo servidor, pode-se usar file() e expressão regular!
Abraços
Abraços
Procurando freelancer
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)